Modifying environment for docker container

I’m trying to run a tutor installation behind an nginx proxy (jwilder/nginx-proxy), and for that I need to add some environment variables to the docker containers, especially the caddy container.

What would be the way to accomplish this? Usually it would just be a configuration in docker-compose.override.yml - but from what I can see, tutor in the prod configuration loads the docker-compose.yml and docker-compose.prod.yml - both of which are generated by templates.

Is there another file I can add that is automatically picked up and merged according to docker-compose rules? Or any other way to get these environment variables to the caddy container?

Thanks in advance!

The solution you are suggesting is the right one. The docker-compose.override.yml will be picked up by Tutor, as documented here: Local deployment — Tutor documentation

Thank you very much - that worked like a charm, even though it doesn’t pull the docker-compose.prod.yml anymore when I create a docker-compose.override.yml - I solved that by copying the prod.yml to the override.yml and modified that accordingly.

However, with my configuration now nginx terminates the https, and just proxies http to the caddy. I get now a permanent loop redirecting to https://$EDXINSTALLATION/ which doesn’t terminate, as it is already https, but EDX still thinks it is http.

Is there a way to stop this behaviour? ENABLE_WEB_PROXY true or false doesn’t seem to have any impact on this.

Thanks again for the help!