Content
docker-compose.override.yml is being ignored
I'm trying to setup some additional env variables for openproject docker like it's described here: https://www.openproject.org/docs/installation-and-operations/configuration/
But whatever additional env variable I add to the docker-compose.override.yml is being ignored. For instance:
version: "3.5"
x-op-app: &app
environment:
OPENPROJECT_SMTP__ADDRESS: "mail.gmx.net"
does not work, but adding it to the original docker-compose.yml does work.
Weirdly, setting a different option for db in docker-compose.override.yml works fine:
version: "3.5"
services:
db:
user: "1009:1009"
This successfully runs the database user as 1009 and all files created by that service are owned by UID 1009.
So docker-compose is picking up the right file, it just seems to ignore env variables for openproject for some reason.
My system is:
docker --version
Docker version 20.10.12, build 20.10.12-0ubuntu2~18.04.1
docker-compose --version
docker-compose version 1.21.2, build a133471
Any idea why the env variables for x-op-app aren't picked up?
Hi,
Docker Compose is not ignoring your file neither the environment variables.
You have to insert the app reference in the docker-compose.override.yml file the same way as in the docker-compose.yml file so Docker Compose can properly override the environment node of the services:
version: "3.5"
x-op-app: &app
environment:
OPENPROJECT_SMTP__ADDRESS: "mail.gmx.net"
services:
web:
<<: *app
worker:
<<: *app
cron:
<<: *app
seeder:
<<: *app
Hope this helps.