I'm not fully understanding the configuration for running ERPnext
locally rather than, for example, on a VPS
.
root@mordor:/home/nicholas/git/frappe_docker#
root@mordor:/home/nicholas/git/frappe_docker# ls -alh
total 120K
drwxrwxr-x 11 nicholas nicholas 4.0K Nov 13 23:09 .
drwxrwxr-x 5 nicholas nicholas 4.0K Nov 13 15:52 ..
drwxrwxr-x 9 nicholas nicholas 4.0K Nov 13 14:10 build
-rw-rw-r-- 1 nicholas nicholas 3.3K Nov 13 14:10 CODE_OF_CONDUCT.md
-rw-rw-r-- 1 nicholas nicholas 1.5K Nov 13 14:10 CONTRIBUTING.md
-rw-rw-r-- 1 nicholas nicholas 3.3K Nov 13 14:10 deploy_key.enc
drwxrwxr-x 2 nicholas nicholas 4.0K Nov 13 14:10 devcontainer-example
drwxrwxr-x 3 nicholas nicholas 4.0K Nov 13 14:10 development
-rw-rw-r-- 1 nicholas nicholas 4.4K Nov 13 14:10 docker-compose.yml
-rw-rw-r-- 1 nicholas nicholas 93 Nov 13 14:10 .dockerignore
drwxrwxr-x 2 nicholas nicholas 4.0K Nov 13 14:10 docs
-rw-rw-r-- 1 nicholas nicholas 609 Nov 13 23:09 .env
-rw-rw-r-- 1 nicholas nicholas 155 Nov 13 14:10 env-example
-rw-rw-r-- 1 nicholas nicholas 605 Nov 13 14:10 env-local
-rw-rw-r-- 1 nicholas nicholas 768 Nov 13 14:10 env-production
-rwxrwxr-x 1 nicholas nicholas 7.6K Nov 13 14:10 frappe-installer
drwxrwxr-x 8 nicholas nicholas 4.0K Nov 13 14:10 .git
drwxrwxr-x 4 nicholas nicholas 4.0K Nov 13 14:10 .github
-rw-rw-r-- 1 nicholas nicholas 188 Nov 13 14:10 .gitignore
-rw-rw-r-- 1 nicholas nicholas 606 Nov 13 14:10 greetings.yml
drwxrwxr-x 3 nicholas nicholas 4.0K Nov 13 14:10 installation
-rw-rw-r-- 1 nicholas nicholas 1.1K Nov 13 14:10 LICENSE.md
-rw-rw-r-- 1 nicholas nicholas 2.4K Nov 13 14:10 README.md
drwxrwxr-x 2 nicholas nicholas 4.0K Nov 13 14:10 tests
-rwxrwxr-x 1 nicholas nicholas 3.0K Nov 13 14:10 travis.py
-rw-rw-r-- 1 nicholas nicholas 8.0K Nov 13 14:10 .travis.yml
drwxrwxr-x 2 nicholas nicholas 4.0K Nov 13 14:10 .vscode
root@mordor:/home/nicholas/git/frappe_docker#
root@mordor:/home/nicholas/git/frappe_docker# cat .env
LETSENCRYPT_EMAIL=saunders.nicholas@gmail.com
ERPNEXT_VERSION=edge
FRAPPE_VERSION=edge
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=admin
SITE_NAME=erpnext-nginx
SITES=`erpnext-nginx`
DB_ROOT_USER=root
ADMIN_PASSWORD=admin
INSTALL_APPS=erpnext
ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=web
CERT_RESOLVER_LABEL=erpnext.local.no-cert-resolver
HTTPS_REDIRECT_RULE_LABEL=erpnext.local.no-redirect-rule
HTTPS_REDIRECT_ENTRYPOINT_LABEL=erpnext.local.no-entrypoint
HTTPS_REDIRECT_MIDDLEWARE_LABEL=erpnext.local.no-middleware
HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL=erpnext.local-no-redirect-middleware
root@mordor:/home/nicholas/git/frappe_docker#
root@mordor:/home/nicholas/git/frappe_docker# docker-compose --project-name erp up -d
Creating erp_redis-socketio_1 ... done
Creating erp_erpnext-python_1 ... done
Creating erp_redis-queue_1 ... done
Creating erp_redis-cache_1 ... done
Creating erp_mariadb_1 ... done
Creating erp_traefik_1 ... done
Creating erp_erpnext-nginx_1 ... done
Creating erp_frappe-socketio_1 ... done
Creating erp_site-creator_1 ... done
Creating erp_erpnext-worker-default_1 ... done
Creating erp_erpnext-worker-long_1 ... done
Creating erp_erpnext-schedule_1 ... done
Creating erp_erpnext-worker-short_1 ... done
root@mordor:/home/nicholas/git/frappe_docker#
root@mordor:/home/nicholas/git/frappe_docker# docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3e8e6ff4fa02 frappe/erpnext-worker:edge "docker-entrypoint.s…" 42 seconds ago Up 33 seconds 8000/tcp erp_erpnext-schedule_1
0b2185b2eec3 frappe/erpnext-worker:edge "docker-entrypoint.s…" 42 seconds ago Up 32 seconds 8000/tcp erp_erpnext-worker-short_1
e1db66cdfa52 frappe/erpnext-worker:edge "docker-entrypoint.s…" 42 seconds ago Up 30 seconds 8000/tcp erp_erpnext-worker-long_1
3835ad9f071a frappe/erpnext-worker:edge "docker-entrypoint.s…" 42 seconds ago Up 31 seconds 8000/tcp erp_erpnext-worker-default_1
4ef8176e1018 frappe/frappe-socketio:edge "docker-entrypoint.s…" 50 seconds ago Up 38 seconds erp_frappe-socketio_1
1c8b90156506 frappe/erpnext-nginx:edge "/docker-entrypoint.…" 54 seconds ago Up 22 seconds 80/tcp erp_erpnext-nginx_1
35628100ad8c redis:latest "docker-entrypoint.s…" 54 seconds ago Up 45 seconds 6379/tcp erp_redis-queue_1
e5b916de16c2 traefik:v2.2 "/entrypoint.sh --lo…" 54 seconds ago Up 50 seconds 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp erp_traefik_1
ab3e5200d004 mariadb:10.3 "docker-entrypoint.s…" 55 seconds ago Up 43 seconds 3306/tcp erp_mariadb_1
a747fc468e9f redis:latest "docker-entrypoint.s…" 55 seconds ago Up 42 seconds 6379/tcp erp_redis-cache_1
8579ea9e4e9d redis:latest "docker-entrypoint.s…" 55 seconds ago Up 50 seconds 6379/tcp erp_redis-socketio_1
b4c0ad3bac2e frappe/erpnext-worker:edge "docker-entrypoint.s…" 55 seconds ago Up 48 seconds 8000/tcp erp_erpnext-python_1
root@mordor:/home/nicholas/git/frappe_docker#
here's a before and after:
nicholas@mordor:~$
nicholas@mordor:~$ lynx http://localhost/ --dump
Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/
nicholas@mordor:~$
nicholas@mordor:~$ lynx http://localhost/ --dump
404 page not found
nicholas@mordor:~$
nicholas@mordor:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 mordor.saundersconsulting.tech mordor mordor.bounceme.net erp.mordor.bounceme.net
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
nicholas@mordor:~$
showing that at least a 404
is being generated, and showing the hosts
file.
Specifically looking at step one of the apparent solution:
- "traefik.http.routers.erpnext-nginx.rule=HostRegexp(`{catchall:.*}`)"
- "traefik.http.middlewares.erpnext-nginx.headers.customrequestheaders.Host=erpnext-nginx"
- "traefik.http.routers.erpnext-nginx.middlewares=erpnext-nginx"
how and where is this accomplished?