3 ms·
Mount a volume on the host and make sure only one database container runs on that host. Done. Then it's exactly like a traditional setup except better because
by jazoom 10y ago
Mount a volume on the host and make sure only one database container runs on that host. Done.
Then it's exactly like a traditional setup except better because if the process crashes or config gets corrupted it can be replaced automatically in a few seconds, good as new.
There's nothing brave about that.
- hmottestad 10y agoThis is what we do. We use Docker Swarm and label our database host. Then add a constraint to the service/container i our docker-compose file so that the database is always scheduled to that host. Great thing about this setup is that we can now run the entire production system locally on our laptops and test servers with or without swarm. Everything is deployed in the same way and everyone uses the same versions and configurations (even for our database).
- Ronsenshi 10y agoSame here. Mounted on the host with the restriction to running containers.