Official Docker Updates 2020

Now we have official docker images.

Thanks to community and:

Official DockerHub Listing


Docker Images Description


For Production Setup:

  • frappe/erpnext-nginx - Reverse proxy and serve ERPNext static assets.
  • frappe/erpnext-worker - Python environment with ERPNext installed. Starts gunicorn, scheduler or workers.
  • frappe/frappe-nginx - Reverse proxy and serve frappe static assets.
  • frappe/frappe-socketio - Frappe socketio service for websocket connections.
  • frappe/frappe-worker - Python environment with Frappe framework installed. Starts gunicorn, scheduler or workers.

More Information



For Development Environment

  • frappe/bench:latest - quick starts development environment. Optionally recommended for use with VS Code dev containers.

More Information



Tags:

  • develop, edge: built daily from develop branch of Frappe and ERPNext
  • version-11, v11, v11.x.x: built monthly from version-11 branch
  • version-12, v12, v12.x.x: built monthly from version-12 branch

What’s working:

  • Quick and easy development environment.
  • Basic production setup with LetsEncrypt.
  • Simple docker-compose commands to get ERPNext up and running on production.
  • Multi-tenancy. Create new sites under one deployment.
  • Basic site operations like create site(s), backup site(s), migrate site(s)

What is expected as community contributions.

35 Likes

Amazing, Thank you for sharing it. I was thinking about building docker image and share it.
Traefik for load balancing and letsencrypt will make it more interesting.

I could get Traefik + Letsencrypt + portainer ui working

I followed this https://dockerswarm.rocks

2 Likes

Perfect! It really Rocks! dockerswarm.rocks Examples are using Traefik v1.7

Auto scaling up/down becomes easy job with docker swarm + Traefik as router.
One can either leave load balancing to docker swarm or use Traefik alone with its many more advantages…

Latest version 2.X of Traefik is even more mature in terms of handling TCP and HTTP/S route requests, better metrics, nice infrastructure dashboard, mirroring, https etc.

1 Like

If you find any updated how-to post here.

It is all user recipes now. Many things are possible. As I move my self hosted sites on docker swarm I’ll post things.

What I’m trying to achieve is repository url pasted in portainer and with few clicks it installs all things as a stack

Sure, If you are using Docker Swarm then https://swarmpit.io/ would be very useful when you are playing with docker-compose based deployment for multi node or single node…

I chose https://portainer.io (golang) as ui for that. I did try swarmpit. I’d prefer portainer

2 Likes

Follow this [update] traefik 2.0 is out ! · Issue #28 · tiangolo/dockerswarm.rocks · GitHub

first of all thanks for this @revant_one.

I am failing to get a “Local deployment for testing” instance running (the erpnext simply does not show under *.localhost) though.

The publish port step is somewhat looking a little suspicious to me (with not much docker expertise)

# Publish port
docker-compose \
    --project-name <project-name> \
    -f installation/docker-compose-common.yml \
    -f installation/docker-compose-erpnext.yml \
    --project-directory installation run --publish 80:80 -d erpnext-nginx

when I run this a secondary erpnext_nginx container (v12_erpnext-nginx_run_85b17bc5267a) is being created

               Name                             Command               State         Ports       
------------------------------------------------------------------------------------------------
v12_erpnext-nginx_1                  /docker-entrypoint.sh ngin ...   Up      80/tcp            
v12_erpnext-nginx_run_85b17bc5267a   /docker-entrypoint.sh ngin ...   Up      0.0.0.0:80->80/tcp
v12_erpnext-python_1                 docker-entrypoint.sh start       Up                        
v12_frappe-schedule_1                docker-entrypoint.sh schedule    Up                        
v12_frappe-socketio_1                docker-entrypoint.sh start       Up                        
v12_frappe-worker-default_1          docker-entrypoint.sh worker      Up                        
v12_frappe-worker-long_1             docker-entrypoint.sh worker      Up                        
v12_frappe-worker-short_1            docker-entrypoint.sh worker      Up                        
v12_mariadb_1                        docker-entrypoint.sh mysqld      Up      3306/tcp          
v12_redis-cache_1                    docker-entrypoint.sh redis ...   Up      6379/tcp          
v12_redis-queue_1                    docker-entrypoint.sh redis ...   Up      6379/tcp          
v12_redis-socketio_1                 docker-entrypoint.sh redis ...   Up      6379/tcp

is this what it is supposed to do?

Yes.

Second container publishes the ports for access on host. Stop and remove the container after use

Docker cannot publish ports for running container.

Another alternative is to add additional compose.yml in the first command itself which override *-nginx service and publish ports.

The multi image setup is mainly for production

Docker Swarm setup with MariaDB master-slave replication.

frappe/erpnext console screenshot

How to do bench get-app to a private repo with public key? Inside the container, I can see the command ssh-keygen is not available

You cannot modify the production images.

To build images with custom app refer GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext

Try it out and report issues

Community edition may not support HA + Letsencrypt in v2.

So, install traefik only on one manager node is possible for free. Configure kv store may be part of enterprise plan.

If that’s the case using nginx + Letsencrypt docker companion is also fine.

can you specify when “after use” is? before creating a new site? Does the container do any harm in case it is not stopped?

For production it is recommended no ports are exposed.

The frontend loadbalancer proxy that exposes all the services running on docker host only needs to publish ports (nginx-companion, traefik). Other containers just inform this proxy container and connect to its network.

So the extra nginx container is just for exposing ports on localhost and trying out things.

In fact no need to delete it container “after use” if the use case in the first place was to use it on localhost itself.

i’ve used this command

docker-compose
–project-name erpnext
-f installation/docker-compose-common.yml
-f installation/docker-compose-erpnext.yml
–project-directory installation run --publish 80:80 -d erpnext-nginx

when i’ve checked i got internal server error

thanks

After that command you need to add a site