Problems installation a production version (v12) with Docker

I’m installing ERPNext “v12” on a clean VM (2vCPU’s & 4GB Memory) with Ubuntu 18.04.

Let’s assume the public IP of my VM: and I want to use ERPNext on this custom domain: (I already linked this domain to the VM’s IP).

Here’s the script I run to prepare the VM:

#! /bin/bash

sudo apt-get update
sudo apt-get -y install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
curl -fsSL | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli docker-compose

git clone
git clone

After this script runs successfully, here’s what I do:

cd docker-compose-letsencrypt-nginx-proxy-companion/
cp .env.sample .env
nano .env
# change IP= to IP=
# save changes

cd ../frappe_docker/
cp env-example .env
nano .env
# change content to:
# => VERSION=v12
# => MARIADB_HOST=mariadb
# => MYSQL_ROOT_PASSWORD=insertstrongpasswordhere123@
# =>
# =>
# save changes

docker-compose \
    --project-name erpnext-mycompany \
    -f installation/docker-compose-common.yml \
    -f installation/docker-compose-erpnext.yml \
    -f installation/docker-compose-networks.yml \
    up -d

docker ps
# =>

Docker compose runs without errors and all containers are running but when visiting in Chrome I get the error:
Your connection is not private

Attackers might be trying to steal your information from  ****  (for example, passwords, messages or credit cards). [Learn more](chrome-error://chromewebdata/#)


When visiting with Firefox I get this error:

When doing docker logs {ID OF CONTAINER "erpnextmycompany_erpnext-python_1"} I get

[2020-05-07 16:55:58 +0000] [25] [ERROR] Error handling request /
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 53, in application
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 108, in init_request
    frappe.init(site=site, sites_path=_sites_path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 150, in init
    local.conf = _dict(get_site_config())
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 224, in get_site_config
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/", line 72, in __getattr__
    return self.__storage__[self.__ident_func__()][name]
KeyError: 'conf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/", line 309, in _get_current_object
    return getattr(self.__local, self.__name__)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/", line 74, in __getattr__
    raise AttributeError(name)
AttributeError: conf

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/gunicorn/workers/", line 280, in handle
    keepalive = self.handle_request(req, conn)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/gunicorn/workers/", line 329, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/", line 231, in application
    return ClosingIterator(app(environ, start_response), self.cleanup)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/wrappers/", line 237, in application
    resp = f(*args[:-2] + (request,))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 96, in application
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 26, in stop
    if frappe.conf.monitor and hasattr(frappe.local, "monitor"):
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/", line 348, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/werkzeug/", line 311, in _get_current_object
    raise RuntimeError("no object bound to %s" % self.__name__)
RuntimeError: no object bound to conf

I’ve tried changing frappe_docker/.env SITES to but this gives me a

503 Service Temporarily Unavailable


When visiting the website.

What am I doing wrong?

Did you create any site?

Once site is created, try restarting nginx-web, nginx-letsencrypt and nginx-gen containers. One of them gets the certificate

Also the docker-compose yaml(s) are for simple example. Make your own yaml with exact version tags. Don’t use v12. Use v12.7.1 and v12.5.1 for image tags.

Alternative production setup.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.