3 ms·
Putting them in the same container means I have to manage the processes myself with something like supervisord. A docker-compose file makes this trivial because
by simplecto 6y ago
Putting them in the same container means I have to manage the processes myself with something like supervisord. A docker-compose file makes this trivial because it is just a matter of a few lines of YAML that link the services together. It also means I can ship updates to my application and restart it without touching the rock-solid Postgres image.
- TekMol 6y agoWhat do you mean by "manage the processes"? Why would you need to touch postgres when updating your application?
- simplecto 6y agoTypically the process to update an application is to push up a new image and then tell docker to stop the old one, and load the new one in its place (yes, I know there are 0-downtime ways, but lets keep it simple). If you put both processes in the same container, then you cannot simply upload a new image and restart the container. This is where it gets very complicated, error prone, and not in line with what I understand to be current best practices with docker.
- TekMol 6y agoI would not use Docker this way. I would treat the docker container like a server. I would update the application inside the running container.