I want to create a minimal compose file that only has frappe/erpnext in one container and the other has PostgreSQL
Will that affect the performance of erpnext
I want to create a minimal compose file that only has frappe/erpnext in one container and the other has PostgreSQL
Will that affect the performance of erpnext
Hello @Menna
The docker setup runs separate containers for each system component. Not all components in the same container.
Here is a list of containers you will get with a standard docker compose file:
frontend-1
websocket-1
queue-short-1
queue-long-1
scheduler-1
backend-1
db-1
redis-queue-1
redis-cache-1
If you enabled Ofelia, you will also get:
cron-1
So, if you want to squeeze all of the above into 1 container:
The question is why? Yet, it is not recommended.
If you thought that there is only 1 container:
It is not the case. There are up to 11 containers per Frappe Instance.
Did the above answer your question?
Let us know
K
Hello @knimer
Thank you for your response.
I understand the usual setup for frappe and my usual setup for it will usually be 10 containers
But this task is to try to use a very minimal compose file with only one frappe container and one DB container.
But i am thinking of how much will that impact the performance.
And if I used 2 Redis containers, one for caching and one for queue, will that improve performance?
How do I test that?
P.S: I am using a custom image based on frappe docker github repo for custom apps. And i am trying to change the image to accomadiate the new structure.
Hello @Menna
I get it. So, thinking out loud:
Each container (other than MariaDB/Redis ones) actually uses the same custom frappe image. But with different entry-points/commands.
Did you try to use a big-entrypoint.sh file with all commands/entrypoints included in it with a proper sequence for 1 container?
Not sure about the complications of doing that. But in theory, doable!
K
Hello @knimer
Thank you for your response.
And thank you for thinking out loud; I really appreciate it.
That is also my thinking. And that is what I am trying to do at the moment.
So, there are also few changes needed other than the entrypoint.
So, I need to change the nginx entrypoint and conf since I will no longer have a separate websocket container. And as you said, I need to change the entrypoint file for the one Frappe container.
I am thinking the areas that will be affected the most for performance will be the background jobs (no more queue containers) and the real time (no more websocket container).
I am trying now to make these changes. But I am thinking about how I am going to test the impact on performance. Are there other areas that will be affected that I am missing, or am I right in thinking background jobs and real time are the two main areas? And will adding the 2 Redis containers help the performance?
PS: I still have not been able to successfully run the modified custom Frappe image. I am still making modification to the entrypoint file and rebuilding.
I have heard frappe cloud uses single container. Maybe someone on that team might share their technique with you.
Although I would like to state my opinion that (although it doesn’t necessarily mean you shouldn’t do it) this goes against the design and purposes of the container ways of doing things. Why not just do a virtual machine instead? Seems to me it would be a better fit.
Hello @trustedcomputer
Thank you for your response.
If someone can shed some insight into how to accomplish that, that will be amazing. I really hope if anyone has managed to do that, they will share any tips on how to achieve that.
I agree with you, and I argued against it. Showed them the frappe_docker repo and how that is the best way to have the best performance, but that is the task, and I am unable to change their minds. I may be able to add the 2 Redis containers, but that is it.