ERPNext Docker Image as an alternative to Official ERPNext Docker Repo

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.

I have run : docker run -d -p 8000:8000 -p 9000:9000 pipech/erpnext-docker-debian:mas-py2-latest
And it has picked on my localhost
How do I login?

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.

1 Like

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.

My setup:
Win 10, docker-compose 1.25.5

I am following GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext and want to start the local deployment for testing, i.e. run expose on localhost.

My .env:
    VERSION=version-12 (I also tried edge)

I can docker-compose up all the containers according to the readme:

docker-compose \
    --project-name <project-name> \
    -f installation/docker-compose-common.yml \
    -f installation/docker-compose-erpnext.yml \
    -f installation/erpnext-publish.yml \
    up -d

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:

error] 29#29: *27 upstream prematurely closed connection  
while reading response header from upstream, client:, server: $http_host, request: "GET / HTTP/1.1",
upstream: "", host: "" - - [11/Jun/2020:18:49:12 +0000] "GET / HTTP/1.1"
502 5444 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:77.0) Gecko/20100101 Firefox/77.0" "-" is the python worker erpnext-python_1 and a curl -v from one of the containers i get an empty reply.

Am i missing something? Thanks in advance

This thread is not for official docker.

It is for alternative images.

Please start new thread or create new issue with label question Issues · frappe/frappe_docker · GitHub

Thank you, I opened a new question at: Issue with local test deployment: upstream prematurely closed connection while reading response header from upstream · Issue #257 · frappe/frappe_docker · GitHub

It’s “12345” or “admin” depend on setup, for production setup

Do you think it might be an idea to add environment variable so that administrators can set a more sensible and secure password?

Could it instead use the init script to output an initial randomly generated password to logs and CLI

Thanks for creating a thing. I think it may help the people who asked about Heroku :ok_hand: .

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.

You should try different version, try this command.

docker run -d -p 8000:8000 -p 9000:9000 pipech/erpnext-docker-debian:v12-py3-latest

After that go to web browser and go to localhost:8000 to access ERPNext

I can’t find a button to update the post but Official ERPNext Docker have becoming active and improved a lot since I create this post.

If you won’t mind its complexity it’s a great way to deploy ERPNext for large enterprise.

I just wanted to clear that out. :grinning:

Made yet another attempt to simplify docs for simple environments.

Hope to help self-hosting small enterprises.

is there any particular reason that this document is only available in the develop branch? In other words, do you need to use the develop branch in order to run this?

I made the post into wiki. Check if you can update it.

hello guys how can i use this docker without losing my data (database ,etc…)

hey pipech . why each time i build a image i lose all the data . can you help me please . and thx


You’ll need to deploy development setup or production setup.
See wiki here > Home · pipech/erpnext-docker-debian Wiki · GitHub

You can also bind the database /var/lib/mysql, and optionally /bench to persistent volumes. However, production setup is better.

i want know monitor.yml + grafana use way, thanks!