Docker Community Forums

Share and learn in the Docker community.

How do I handle using different database/storage solutions in different environments (AWS)

I’m using Docker with Laravel.
My dockerfile pulls in the PHP image, runs the relevant installation commands (a few PHP add-ons, and the mysql client), and then mounts my source code in a shared volume.
My docker-compose file sets up an nginx container, an app container (i.e. an instance of the image built by my dockerfile), and a MySQL container. The containers communicate across the docker bridge with each other.
The issue is that I want to deploy to AWS Fargate and use RDS for the database service - in which case the live deployment doesn’t need a MySQL container. What’s the best practice for altering the docker structure depending on deployment stage? I’ve seen arguments both for and against using separate docker-compose files.