4 ms·
Running docker compose in production is not a good practice from what I understand. The persistence layers, like MySQL or Redis, shouldn’t be managed with local
by peterthehacker 5y ago
Running docker compose in production is not a good practice from what I understand. The persistence layers, like MySQL or Redis, shouldn’t be managed with local volumes. If you want to do something like this then kubernetes with persistent volume claims would be better, but running databases in k8s can be pretty tricky. Most of the time RDS is the best practice for your DB.
- zmmmmm 5y agoSwapping out the persistence layer in prod vs dev is one of the topics covered by the article, for the reasons you mention.
- peterthehacker 5y agoThere’s no mention of kubernetes persistent volume claims.. it does mention that you can swap out a DATABASE_URL env var here: > Or perhaps you want to use a managed PostgreSQL database in production but run PostgreSQL locally in a container for development. It’s mentioned in passing with no discussion of why you should not run your database in docker compose - a very common use case - so the reasons I mentioned were not explicitly discussed.