I’m curious about what would be considered “good practices.” I’m currently working on writing the same project in multiple languages/frameworks, where I want them all to have access to the same database instance so I don’t have to think about synchronizing multiple databases as a learning exercise. I watched this video by Dreams of Code on YouTube about deploying a production ready VPS, where he uses Docker Compose to handle running both some infrastructure and his app from a single Compose file.
That video made me wonder: with my situation of having multiple apps, if I wanted to use a similar setup, which would be better:
- using a single Compose file to setup the infrastructure (traefik, Watchtower, DB), then deploy each of the apps as standalone containers configured to connect up with the infrastructure
- Adding new images to the Compose file as I complete another language or framework and re-run
compose up -d
I’m still relatively new to the world of containerization, so I wanted to see what others would consider to be the better approach.