I know It’s a very late comment. But I don’t think that’s precisely the Idea of docker. Yes it offers to isolate things like that. Otherwise let’s just spin up a worker for every task is needed. Is just in my opinion overkill. I’m not an expert on Docker. But I have deployed many applications, and It tends to be pretty easy.
The frappe/frappe_docker repo is honestly a nightmare for what Docker represents. It spins I think 11 containers, and you have 3 docker-compose files. Go check any other ERP and you would see one simple compose file.
Odoo, Tryton, a simple docker-compose file and voila.
The workers execute the tasks the bench usually does, but using some python scripts. Like creating a new site, installing apps, etc. So what is the bench for and all It’s 1600 commits to date. If you’re not going to use it when deploying in docker?
Overall I think it’s very important for the product to be easily deployed, In opens the doors to new people. And drives adoption up.
The work done on docker is elegant if one understands Kubernetes. It is not just about deploying on docker because it would be no better than deploying on a server machine. It is about having Kubernetes take care of the load by deploying just the component that is overworked or got bogged down. You don’t deploy mariadb with frappe in one container otherwise you deploy two separate databases. What the Erpnext has done with this docker and kubernetes setup is to properly separate the different parts of the monolith into correct microservices. This makes Erpnext much more powerful compared to Odoo or Tryton and enables it to compete on the enterprise level
I must admit, I do not understand Kubernetes, and I can see that separating the images gives you more flexibility. I only argue that well making it easier to install for developers, not devops people should be very useful!
Great work with it. I’ll work on it and will send PRs, maybe you consider them good. I was thinking of a simple Makefile. That instead of calling docker compose with multiple files, and then having to lookup the command to spin it down.
I’m not an expert, but something like this might make things easier.
# Start frappe and initialize the site in the env variable
make erpnext-up init
# Bring it down
make erpnext-down
I would like to ask, why bench is not used on the docker containers, and instead the use of the python scripts? I’m trying to familiarize with the architecture.
In this case, docker may not be the solution. It is better to install directly to the machine using Easy Install. However you will have to monitor the status of tge machine. Kubernetes enables you to deploy applications and monitors the health of the deployment. If it detects that there are too many connections, it will spin up another instance of the application using docker and do load balance. When it detects few connections it will spin down the excess instances. This way you dont have to get a big server with excess capacity. You will just need docker images waitingbto be spin up or down based on demand. ERPNext is designed as a monolith with the interlocked connections to mariadb database, redis, backgound workers, bench for development. It was designed for the 2010 era. In 2020, Computing is not needed to be server based but cloud based where computing power can be bought as a utility from cloud providers. This is where Kubernetes and docker shines. This work on ERPNext allows it to be ready for the 2020 era. There is still a lot of room for improvement. But it is a great start to push ERPNext in the DevOps arena.
Hey all,
I am new and experiencing some difficulties with getting erpnext running with docker-compose. Since this thread is very active I didnt open a new one, hope thats okay.
But when I open localhost:80 in browser I get the sorry we will be back soon error page. I get no errors from docker-compose -f … logs,
but: docker logs erpnext-nginx_1 gives me:
Yes, you should use bench new-site command and set a new password for production setup but for trial or development setup I think security won’t matter.
Even if you didn’t plan to spin up multiple container or production setup if you want secure password you could use bench set-admin-password.