Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: combine frontend and backend into single container #1512

Closed
wants to merge 2 commits into from

Conversation

davidyuk
Copy link
Member

@davidyuk davidyuk commented Aug 12, 2023

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
Copy link

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

@dincho
Copy link
Member

dincho commented Aug 15, 2023

I strongly disagree with this PR/change.

Copy link
Member

@dincho dincho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving my comment to an review so that github stops list it in my review queue :)

I strongly disagree with this PR/change.

@davidyuk
Copy link
Member Author

davidyuk commented Nov 3, 2023

🤷‍♀️

@davidyuk davidyuk closed this Nov 3, 2023
@davidyuk davidyuk deleted the feature/single-container branch November 3, 2023 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants