Intentionally removing volumes in override docker-compose files

I’m assuming you want to use docker-compose up to start the development version, and have a second config file to extend it for production.

If you want to make sure to override volumes completely, use a third config file, docker-compose.override.yml. Put all your volume definitions for development in there.

docker-compose up extends the base config with this file by default. But when you do something like docker-compose -f docker-compose.yml -f production.yml, the docker-compose.override.yml file won’t be loaded, and you’ll get only the volumes from the production file.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)