V4: is it possible to add items to the docker compose file?

I have a shared mu-plugins folder i would like to reuse on multiple sites. I created the volume in docker and added it to the docker-compose files of two sites.
Everything was working fine.

Then i updated to 4.0.11 which rewrote the docker-compose files (to add new relic stuff) and removed my changes.

Is there a way to add more configuration? Will docker-compose.override.yml be honoured?

Similarly is there a way to add additional configuration into the nginx proxy config so that it won’t be overwritten every restart? In this case i want to proxy to a standalone netdata docker instance.

1 Like

Valid question.

6days he had posted. No one replies ? Nerve wrecking as I actually thought about switching to ee

Replying to myself for part one:
Yes. If you create a file called docker-compose.override.yml in the same folder as docker-compose.yml for the site, it is automatically loaded and the configuration in there applied.

In my case, I created a folder I wanted to share between sites: /var/lib/docker/volumes/global-mu-plugins/_data and added some mu-plugins code there.
Then for each site, I created the docker-compose.override.yml file with the following contents:

version: '3.5'


      - "muplugins:/var/mu-plugins"

      - "muplugins:/var/mu-plugins"

      name: global-mu-plugins

Then re-started the sites. This then means the /var/mu-plugins folder now exists on each site.

I had to manually create a symlink with ee shell example.com --command='ln -s /var/mu-plugins /var/www/htdocs/wp-content/mu-plugins' as I haven’t figured out how to do that automatically. It may be doable with an autorun script in the docker-compose which would be great.

I haven’t figured out the nginx proxy issue yet.