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

Create a Frappe Health Docker image #468

Open
neutralboy opened this issue Jun 10, 2024 · 1 comment
Open

Create a Frappe Health Docker image #468

neutralboy opened this issue Jun 10, 2024 · 1 comment

Comments

@neutralboy
Copy link

neutralboy commented Jun 10, 2024

Is your feature request related to a problem? Please describe.

ERPNext has a docker image but Frappe Health does not, with ERPNext moving to a single docker image we have a chance to create a single Frappe Health image that has frappe, erpnext and health apps.
We have tried to deploy this app inside Kubernetes with statefulsets and since the code lives inside sites and I cannot persist it, so a single image for all of it would be great.

Describe the solution you'd like

I'd like there to be a single Dockerfile which creates a frappe/health image.

Describe the alternatives you've considered

  • Running the bench get-app and install command in the production before we start running the services

Additional context

If required I can submit a PR with a Dockerfile based on what has worked for us internally @medblocks
This solves a few issues that have been filed: #190 and #273

@neutralboy
Copy link
Author

Dockerfile what we use is something super simple

FROM frappe/erpnext:v15.26.0
ARG APP_NAME=frontend
RUN bench get-app healthcare
CMD [ \
  "/home/frappe/frappe-bench/env/bin/gunicorn", \
  "--chdir=/home/frappe/frappe-bench/sites", \
  "--bind=0.0.0.0:8000", \
  "--threads=4", \
  "--workers=2", \
  "--worker-class=gthread", \
  "--worker-tmp-dir=/dev/shm", \
  "--timeout=120", \
  "--preload", \
  "frappe.app:application" \
]  

Then in production you just run

bench --site ${APP_NAME} install-app healthcare

before all the other processes are started.
And it simply works

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

1 participant