mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
change dc alias into a function so it could be dynamic
This commit is contained in:
11
README.md
11
README.md
@@ -56,10 +56,17 @@ export PHRASEANET_APP_PORT=8082
|
||||
|
||||
It may be easier to deal with a local file to manage our env variables.
|
||||
|
||||
You can add your `env.local` at the root of this project and define a command alias in your `~/.bashrc`:
|
||||
You can add your `env.local` at the root of this project and define a command function in your `~/.bashrc`:
|
||||
|
||||
```bash
|
||||
alias dc="env $(cat env.local | grep -v '#' | tr '\n' ' ') docker-compose"
|
||||
# ~/.bashrc or ~/.zshrc
|
||||
function dc() {
|
||||
if [ -f env.local ]; then
|
||||
env $(cat env.local | grep -v '#' | tr '\n' ' ') docker-compose $@
|
||||
else
|
||||
docker-compose $@
|
||||
fi
|
||||
}
|
||||
```
|
||||
|
||||
### Running the application
|
||||
|
Reference in New Issue
Block a user