docker / compose

Define and run multi-container applications with Docker
https://docs.docker.com/compose/
Apache License 2.0
33.89k stars 5.21k forks source link

Support a PROJECT_DIRECTORY environment variable #10920

Open CaptainQuirk opened 1 year ago

CaptainQuirk commented 1 year ago

Description

Hi !

We're using the --project-directory flag to store all our docker compose related files in a .docker directory.

The frameworks we're using in our web projects are all using the dotenv mechanism but we decided that having a single env file containing both docker related variables and app related variables was not the road we wanted to take.

If a PROJECT_DIRECTORY variable was supported, it would save us some keystrokes. While we took the habit of hiding some of the complexity in Makefiles for example, we are still bound to type a full docker compose command at some point.

Thanks in advance !

sprat commented 11 months ago

I would also love to see this feature implemented, it would simplify the usage when using "docker compose" in a container, because it's easier to pass environment variables than messing with the command-line especially when we can't put this parameters after the "command" word.

MikaelElkiaer commented 7 months ago

I would also love this.