Fix .env.prod never reaching the puzzle relay containers
docker-compose's env_file loads .env directly into each container's real environment - and Symfony's Dotenv never lets a .env.$APP_ENV file override a variable the platform already set. Since .env.prod was never in the env_file list, PUZZLE_RELAY_PUBLIC_URL kept resolving to the dev default (ws://127.0.0.1:8091) in production instead of the wss://dmtools.fvandenberg.nl/puzzle-ws/ override. Load .env.prod here too, after .env/.env.local, so its values actually win. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,10 +21,17 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: docker/php/Dockerfile
|
dockerfile: docker/php/Dockerfile
|
||||||
container_name: dmtools-php
|
container_name: dmtools-php
|
||||||
|
# Real container env vars always beat Symfony's own .env.$APP_ENV cascade
|
||||||
|
# (that's the point of Dotenv - it never overrides a var the platform
|
||||||
|
# already set) - so .env.prod has to be loaded here too, or its values
|
||||||
|
# (e.g. PUZZLE_RELAY_PUBLIC_URL) never reach the app; the plain .env
|
||||||
|
# default silently wins instead. Order matters: later files win.
|
||||||
env_file:
|
env_file:
|
||||||
- path: .env
|
- path: .env
|
||||||
- path: .env.local
|
- path: .env.local
|
||||||
required: false
|
required: false
|
||||||
|
- path: .env.prod
|
||||||
|
required: false
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/www/html:cached
|
- .:/var/www/html:cached
|
||||||
- php_var:/var/www/html/var
|
- php_var:/var/www/html/var
|
||||||
@@ -43,6 +50,8 @@ services:
|
|||||||
- path: .env
|
- path: .env
|
||||||
- path: .env.local
|
- path: .env.local
|
||||||
required: false
|
required: false
|
||||||
|
- path: .env.prod
|
||||||
|
required: false
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/www/html:cached
|
- .:/var/www/html:cached
|
||||||
- php_var:/var/www/html/var
|
- php_var:/var/www/html/var
|
||||||
|
|||||||
Reference in New Issue
Block a user