-
-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.env.prod.local not picked up on docker compose up #628
Comments
Hello @fleonardelli! You can say to Docker Compose to use non-default .env-file by setting |
Can you provide a reproducer pls ? |
Run: Modify the compose.prod.yaml to:
Add .env.prod.local:
Now run: It will output: @maxhelias I guess it's enough. Because of that if I request the server it will always print phpinfo() output. |
@fleonardelli when you configure both If there are required parameters in If you want to be able to convert environment variables (as is done in this template), then you must use the The documentation page has a table of results when there are multiple sources for environment variable values. However, there is no example of what the result will be if both parameters are present (in attribute |
In the docs https://github.com/dunglas/symfony-docker/blob/main/docs/production.md there last section says that you can pass env variables adding the .env.prod.local env_file to compose.prod.yaml.
I've added it, and created .env.prod.local:
So now instead of running:
I want to run
docker compose -f compose.yaml -f compose.prod.yaml up -d --wait
But I keep getting:
WARN[0000] The "CADDY_MERCURE_JWT_SECRET" variable is not set. Defaulting to a blank string.
WARN[0000] The "CADDY_MERCURE_JWT_SECRET" variable is not set. Defaulting to a blank string.
If I run it
CADDY_MERCURE_JWT_SECRET=ChangeThisMercureHubJWTSecretKey docker compose -f compose.yaml -f compose.prod.yaml up -d --wait
The container stops restarting, but if I run
export
within the container, I can see the SERVER_NAME is the one from the .env variable and not from the .env.prod.local
I can't figure out how to make it pick up .env.prod.local.
The text was updated successfully, but these errors were encountered: