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

Proposal for single image production containers #1028

Closed
revant opened this issue Dec 23, 2022 · 5 comments
Closed

Proposal for single image production containers #1028

revant opened this issue Dec 23, 2022 · 5 comments

Comments

@revant
Copy link
Collaborator

revant commented Dec 23, 2022

Reasons:

  • At this moment we have 3 images built to run ERPNext or any frappe app. Images are nginx, worker, socketio.
  • Size of 3 images is greater than or equal to size of 1 image with everything.
  • Assets need to be mounted for python containers as they are part nginx container.
  • Building decoupled images diverges from upstream bench tooling.

Pros:

  • Only one image to maintain (erpnext)
  • One image downloaded on container host, no need to download 3 images.
  • Least divergence from upstream bench tooling
  • Continue with container best practices of immutable app code.

Cons:

  • One big image. Any container host will need to download 1 big image irrespective of which container it needs to start.
  • Major refactor to builds needed
  • Refactor needs to consider backward compatibility.

Info:

@revant
Copy link
Collaborator Author

revant commented Dec 27, 2022

It also means no more frappe images.

following images will be available:

  • frappe/bench:latest
  • frappe/erpnext:latest
  • frappe/erpnext:v13 and version tag
  • frappe/erpnext:v14 and version tag

Custom apps will be built from base anyway. So no need of frappe images.

@revant
Copy link
Collaborator Author

revant commented Dec 28, 2022

#1032

@sdfateh
Copy link
Contributor

sdfateh commented Dec 28, 2022

@revant Thank you for this great effort!

But I think the current setup of 3 images is better than this, especially for custom app building, and management.

This single image will make it a server application, I like the current images which seem to be simple microservices-like setup

I think we have to discuss this proposal more...

@revant
Copy link
Collaborator Author

revant commented Dec 28, 2022

This single image will make it a server application, I like the current images which seem to be simple microservices-like setup

I don't use any VM. I use kubernetes. So it'll be microservices based. also, it'll be migration friendly.

edit: for clarification, there will be 1 image, but there will be same number of containers, frontend, backend, 3 workers, schedule and websocket

edit: check this https://github.com/castlecraft/frappe_containers/blob/main/docs/build-custom-image.md. Building images with custom apps is as easy as supplying APPS_JSON.

@revant
Copy link
Collaborator Author

revant commented Dec 28, 2022

Move discussion to PR

@revant revant closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants