Closed rosiel closed 1 year ago
It can't be put into the .env
file as it is a committed file, it doesn't really make sense to modify it for this purpose.
You can use the COMPOSE_PROFILES
environment variable to prevent the need for retyping it all the time.
See https://docs.docker.com/compose/profiles/
For example, in bash.
export COMPOSE_PROFILES=dev
You could add the above line to your .bashrc
file, so you don't have to write the above every time you create a new shell.
More info on .bashrc
.
https://www.digitalocean.com/community/tutorials/bashrc-file-in-linux
I'm trying to break myself of thinking of commands in terms of
docker compose build
anddocker compose up
. unfortunately the--profile dev
or--profile prod
part has to be put before the command, and this causes a lot of backspacing and re-typing.Is this something that could/should be put in .env so that we can run those commands without the profile part?