Refactor docker image and create a helm chart#171
Refactor docker image and create a helm chart#171hanshuai merged 7 commits intoopenblocks-dev:developfrom ludomikula:develop
Conversation
|
Thank you so much for your contribution, it's really nice. We'd like to have some discussions with you about the changes to image splits. |
|
Yes, I can see your reasons for having an all-in-one image, but updating the docker-compose should not be that difficult either, right? :) For development or educational purpose it's ok, but for a production purpose it's not that good especially if you want to run it in cluster. There are a lot of different use cases for which you will be deploying openblocks and in my opinion having the containers separated makes it possible to handle all of them efficiently. If you want to install openblocks as SaaS service, you would definitely need to be able to scale server application and have a separate database and redis. With enough users joining, I would probably split the server application service into separate auth/api/login services (handling requests for one endpoint eg. /login) where one instance would take care just for authentication etc, to scale just the part of the application which might be a bottleneck. (By splitting the service I mean running a server application container which would handle just /login requests, another one to handle just /api requests etc). It's also a best practice to decouple applications in containers (https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#decouple-applications). |
|
Hi @ludomikula. |
|
Would it be feasible to build it this way (which could satisfy everybody): Intermediary:
Final image (all-in-one) would:
This way you can build all-in-one image same way like it is done now, but it gives you the ability to create also the standalone images like this: |
|
@ludomikula. This is a great solution, thank you so much for your suggestion! Not sure if you'd be interested in contributing to it. |
|
Yeah I will update this pull request to do it that way. I would probably opt for doing separate nodejs image. |
|
|
@jerry-goodman I have reworked the docker building process to create the intermediary images as well as the all-in-one image which is composed from the "standalone" ones. Will re-add the helm chart once it's updated. See deploy/docker/README.md for some details. Any suggestions/fixes/ideas welcome :) |
|
Thanks for your contribution, I'll take a closer look at this later. |
|
Hi @ludomikula. I found some points that do not support the arm architecture after tests. We can merge your pr first, and I will modify it later. Thanks again for your contribution 💪💪. |
I took the initial helm chart from @rhythmicdevil as a starting point .
There are couple of main changes:
Reasons why I split the image: