1

About nine minutes into a tutorial on ERPNext I followed directions as:

root@mordor:/home/nicholas/git/frappe_docker# 
root@mordor:/home/nicholas/git/frappe_docker# cat .env
[email protected]
ERPNEXT_VERSION=edge
FRAPPE_VERSION=edge
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=admin
SITE_NAME=erp.mordor.bounceme.net
SITES=`erp.mordor.bounceme.net`
DB_ROOT_USER=root
ADMIN_PASSWORD=admin
INSTALL_APPS=erpnext
ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=websecure
CERT_RESOLVER_LABEL=traefik.http.routers.erpnext-nginx.tls.certresolver=myresolver
HTTPS_REDIRECT_RULE_LABEL=traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
HTTPS_REDIRECT_ENTRYPOINT_LABEL=traefik.http.routers.http-catchall.entrypoints=web
HTTPS_REDIRECT_MIDDLEWARE_LABEL=traefik.http.routers.http-catchall.middlewares=redirect-to-https
HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL=traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
root@mordor:/home/nicholas/git/frappe_docker# 
root@mordor:/home/nicholas/git/frappe_docker# docker-compose up -d
Creating network "frappe_docker_default" with the default driver
Creating volume "frappe_docker_redis-cache-vol" with default driver
Creating volume "frappe_docker_cert-vol" with default driver
Creating volume "frappe_docker_redis-queue-vol" with default driver
Creating volume "frappe_docker_mariadb-vol" with default driver
Creating volume "frappe_docker_redis-socketio-vol" with default driver
Creating volume "frappe_docker_sites-vol" with default driver
Creating volume "frappe_docker_assets-vol" with default driver
Pulling erpnext-python (frappe/erpnext-worker:edge)...
edge: Pulling from frappe/erpnext-worker
Digest: sha256:45e7fb925187bc6ed71ca8db2bd886a8cbcfb7714197b7f140fb479469bc3c98
Status: Downloaded newer image for frappe/erpnext-worker:edge
Pulling mariadb (mariadb:10.3)...
10.3: Pulling from library/mariadb
6a5697faee43: Pull complete
ba13d3bc422b: Pull complete
a254829d9e55: Pull complete
2ee2cadd29fc: Pull complete
6915a184049d: Pull complete
5ca6ffdb5f56: Pull complete
1537f7bbef8b: Pull complete
5790e54322d1: Pull complete
ea98cb829471: Pull complete
3247072bad5f: Pull complete
b3f16e2db43f: Pull complete
d78c54af82d5: Pull complete
b08843faa954: Pull complete
Digest: sha256:69dec37e0651252108d61ac87874ed8d83b74ead38d196b0bb10d784b7295e8b
Status: Downloaded newer image for mariadb:10.3
Pulling frappe-socketio (frappe/frappe-socketio:edge)...
edge: Pulling from frappe/frappe-socketio
babf97a3f00a: Pull complete
d81eb1809d95: Pull complete
d50e90677ab1: Pull complete
4ca478941ba5: Pull complete
cac0c8c03bb1: Pull complete
55aedfc1b65f: Pull complete
1bee561a211c: Pull complete
fab9a623660f: Pull complete
7b5f157fcbc6: Pull complete
e5f74c3ab32d: Pull complete
6f1760dc7d35: Pull complete
f9389a9f5f4c: Pull complete
Digest: sha256:dfe6dc1d2ffb824f04dc2cd620327f75355620ba657865ee98441c88b8596ed5
Status: Downloaded newer image for frappe/frappe-socketio:edge
Pulling traefik (traefik:v2.2)...
v2.2: Pulling from library/traefik
cbdbe7a5bc2a: Pull complete
f16506d32a25: Pull complete
605303653d66: Pull complete
a9005a35b171: Pull complete
Digest: sha256:ea0aa8832bfd08369166baecd40b35fc58979df8f5dc5182e4e63ee6adbe66db
Status: Downloaded newer image for traefik:v2.2
Pulling erpnext-nginx (frappe/erpnext-nginx:edge)...
edge: Pulling from frappe/erpnext-nginx
bb79b6b2107f: Pull complete
5a9f1c0027a7: Pull complete
b5c20b2b484f: Pull complete
166a2418f7e8: Pull complete
1966ea362d23: Pull complete
3915f6e86363: Pull complete
f6bb7178bcfb: Pull complete
44ac8c313cd6: Pull complete
07bf0268acb1: Pull complete
2b15c776928e: Pull complete
58517104a340: Pull complete
44e719acaf68: Pull complete
f16420799ad5: Pull complete
Digest: sha256:d7031e28b62d0e67eae432937902fe618d32709039a1d63199598881ed5c6459
Status: Downloaded newer image for frappe/erpnext-nginx:edge
Creating frappe_docker_redis-cache_1     ... done
Creating frappe_docker_erpnext-nginx_1  ... done
Creating frappe_docker_mariadb_1        ... done
Creating frappe_docker_erpnext-python_1  ... done
Creating frappe_docker_redis-socketio_1 ... done
Creating frappe_docker_traefik_1                ... done
Creating frappe_docker_redis-queue_1    ... done
Creating frappe_docker_frappe-socketio_1        ... done
Creating frappe_docker_site-creator_1           ... done
Creating frappe_docker_erpnext-schedule_1       ... done
Creating frappe_docker_erpnext-worker-long_1    ... done
Creating frappe_docker_erpnext-worker-default_1 ... done
Creating frappe_docker_erpnext-worker-short_1   ... done
root@mordor:/home/nicholas/git/frappe_docker# 




root@mordor:~# 
root@mordor:~# docker container list
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                                      NAMES
d150de825277        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   15 minutes ago      Up 15 minutes       8000/tcp                                   frappe_docker_erpnext-worker-short_1
54c716c27275        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   15 minutes ago      Up 15 minutes       8000/tcp                                   frappe_docker_erpnext-worker-default_1
ef73c8514f32        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   15 minutes ago      Up 15 minutes       8000/tcp                                   frappe_docker_erpnext-schedule_1
ce45f0955bac        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   15 minutes ago      Up 15 minutes       8000/tcp                                   frappe_docker_erpnext-worker-long_1
9a3eb0a2f9d2        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   15 minutes ago      Up 15 minutes       8000/tcp                                   frappe_docker_site-creator_1
652280f21336        frappe/frappe-socketio:edge   "docker-entrypoint.s…"   16 minutes ago      Up 15 minutes                                                  frappe_docker_frappe-socketio_1
e6b6c59b01fd        redis:latest                  "docker-entrypoint.s…"   16 minutes ago      Up 16 minutes       6379/tcp                                   frappe_docker_redis-queue_1
c3e0d8c41c08        redis:latest                  "docker-entrypoint.s…"   16 minutes ago      Up 16 minutes       6379/tcp                                   frappe_docker_redis-socketio_1
58cd5b59579c        traefik:v2.2                  "/entrypoint.sh --lo…"   16 minutes ago      Up 15 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   frappe_docker_traefik_1
4a4b4caffbec        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   16 minutes ago      Up 15 minutes       8000/tcp                                   frappe_docker_erpnext-python_1
221dd3e1e419        frappe/erpnext-nginx:edge     "/docker-entrypoint.…"   16 minutes ago      Up 14 minutes       80/tcp                                     frappe_docker_erpnext-nginx_1
6100cc729cb1        redis:latest                  "docker-entrypoint.s…"   16 minutes ago      Up 15 minutes       6379/tcp                                   frappe_docker_redis-cache_1
a31d8a43726c        mariadb:10.3                  "docker-entrypoint.s…"   16 minutes ago      Up 16 minutes       3306/tcp                                   frappe_docker_mariadb_1
root@mordor:~# 

However:

nicholas@mordor:~$ 
nicholas@mordor:~$ lynx localhost --dump

Looking up localhost
Making HTTP connection to localhost
Sending HTTP request.
HTTP request sent; waiting for response.
HTTP/1.0 302 Found
Data transfer complete
HTTP/1.0 302 Found
Using https://localhost/
Looking up localhost
Making HTTPS connection to localhost

lynx: Can't access startfile http://localhost/
nicholas@mordor:~$ 

How do I configure as above for local usage? Effectively, offline. To my understanding, nginx is being used as a reverse proxy here.

I'm getting some result:

nicholas@mordor:~$ 
nicholas@mordor:~$ lynx erp.mordor.bounceme.net --dump

nicholas@mordor:~$ 

but not the welcome screen I'm looking for. The FQDN isn't publicly available.

1 Answer 1

2

According to your screen dump you have your port 80 mapped to the Traefik container

58cd5b59579c traefik:v2.2 "/entrypoint.sh --lo…" 16 minutes ago Up 15 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp frappe_docker_traefik_1

The listen address of this mapping is 0.0.0.0 on both port 80 HTTP, and 443 HTTPS which means it listens on all your computer interfaces. Including the local-loopback interface which has the address of 127.0.0.1.

Most operating systems have a file called hosts which is located at /etc/hosts for Linux, MacOS, BSD and at C:\Windows\System32\drivers\etc\hosts for Windows 10.

This file maps the DNS names (such as localhost) to their IP addresses, like 127.0.0.1.

For you to have a working FQDN, you can temporarily create a new mapping in this file to map your desired name to the local-loopback address of 127.0.0.1.

Edit the hosts file and add a line saying:

127.0.0.1 erp.mordor.bounceme.net

The applications that lookup that name later, such as lynx, will now know that erp.mordor.bounceme.net is located at 127.0.0.1 IP address. And your Docker Traefik container is listening there (as well) on ports 80 and 443.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.