aeternity / aepp-base

Base æpp
https://base.aepps.com
ISC License
42 stars 24 forks source link

chore: combine frontend and backend into single container #1512

Closed davidyuk closed 11 months ago

davidyuk commented 1 year ago

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.

https://docs.docker.com/config/containers/multi-service_container/

github-actions[bot] commented 1 year ago

Deployed to https://pr-1512-aepp-base.stg.aepps.com

dincho commented 1 year ago

I strongly disagree with this PR/change.

davidyuk commented 11 months ago

🤷‍♀️