It was requested by Metin, as I understand, to simplify HC setup. I don't have a strong opinion about this approach, from one side it really simplifies things, it would allow updating frontend and backend at the same time, but this doesn't seem to be a good practice. In docker-compose I can specify a restart policy for the whole container, but not for its process. For example, what should happen if the backend process gets crushed? Should nginx also be stopped or should the backend restart automatically? Should it be restarted infinitely? Notify the container manager somehow?
This PR is supported by the Æternity Crypto Foundation
It’s best practice to separate areas of concern by using one service per container. That service may fork into multiple processes (for example, Apache web server starts multiple worker processes). It’s ok to have multiple processes, but to get the most benefit out of Docker, avoid one container being responsible for multiple aspects of your overall application. You can connect multiple containers using user-defined networks and shared volumes.
It was requested by Metin, as I understand, to simplify HC setup. I don't have a strong opinion about this approach, from one side it really simplifies things, it would allow updating frontend and backend at the same time, but this doesn't seem to be a good practice. In docker-compose I can specify a restart policy for the whole container, but not for its process. For example, what should happen if the backend process gets crushed? Should nginx also be stopped or should the backend restart automatically? Should it be restarted infinitely? Notify the container manager somehow?
This PR is supported by the Æternity Crypto Foundation
https://docs.docker.com/config/containers/multi-service_container/