wyveo / craftcms-docker

Craft3/Craft2 CMS Docker base (Nginx, PHP-FPM 8, PostgreSQL/MariaDB, Redis)
https://hub.docker.com/r/wyveo/craftcms-docker
MIT License
100 stars 31 forks source link

Env vars when running the image are ignored #6

Closed robotmay closed 7 years ago

robotmay commented 7 years ago

Just stumbled across this whilst trying to boot the image in my orchestration system. It looks like the DB env vars in the docker-compose.yml file are ignored in favour of those in the .env.sample file copied over during compilation. I'm assuming that file is being loaded and overwriting the env vars passed in through docker, as echo $DB_HOST on the command line returns the correct one.

I'm not especially familiar with the setup, so I'm not sure if there's a correct way of remedying this, but perhaps the Dotenv library has an option for defaulting to the existing vars?

robotmay commented 7 years ago

Looks like this is actually a problem or a missing configuration option on the CraftCMS side. I'll continue investigating and close this for now!