I am installing ERPNext in my computer to be accessed locally (not to be exposed to network), so that I follow the instruction at Setup Frappe without proxy and external MariaDB and Redis. I am using Ubuntu Impish and docker and docker compose from Ubuntu repository, this was a failure at first, because the docker compose is not v2. However I’ve installed docker compose v2 manually. Now, docker-compose.yml has been successfully generated, but docker compose up -d was fail, the log of frappe_docker-configurator-1 is:
Traceback (most recent call last):
File "/usr/local/bin/configure.py", line 56, in <module>
raise SystemExit(main())
File "/usr/local/bin/configure.py", line 45, in main
db_host=env("DB_HOST"),
File "/usr/local/bin/configure.py", line 29, in env
raise RuntimeError(f'Required environment variable "{name}" not set')
RuntimeError: Required environment variable "DB_HOST" not set
Traceback (most recent call last):
File "/usr/local/bin/configure.py", line 56, in <module>
raise SystemExit(main())
File "/usr/local/bin/configure.py", line 45, in main
db_host=env("DB_HOST"),
File "/usr/local/bin/configure.py", line 29, in env
raise RuntimeError(f'Required environment variable "{name}" not set')
RuntimeError: Required environment variable "DB_HOST" not set
Please help. I don’t know what to set to DB_HOST because the comment in .env said it is needed only if using external db.
Thanks @revant_one, the containers have run. However, when I open 127.0.0.1:8080 or localhost:8080 it is Not Found. I’ve tried to change $$host with localhost but still doesn’t work.
Thank you @revant_one, now the login page has been appeared, however I cannot login. The username is admin, right? Sorry, I can’t find the documentation about first login.
What I’ve done:
docker volume rm <frappe_docker_* volumes> # start from 0
docker compose -f compose.yaml \
-f overrides/compose.noproxy.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.mariadb.yaml \
config > ../docker-compose.yml
cd ..
docker compose up -d
docker compose exec backend bench new-site erpnext.localhost \
--mariadb-root-password 123 --admin-password <admin-password>
# Open http://erpnext.localhost:8080 in browser
# Log in with admin:<admin-password>
# Login failed
Turns out that I’ve taken the wrong example from the beginning, I wanted to install ERPNext but I installed Frappe only. Not sure if it was because I was a newbie or because the docs was not “linear”, it took me here and there. Thanks @revant_one for the guide. Here’s the summary:
How to install ERPNext, containerized (with Docker) and offline (in localhost)
Impression: installing in “localhost” is usually meant to be a personal computer that’s turned on and off daily; compared to Odoo, the containers take too long to up and down, even the queues, scheduler, and websocket containers never stop successfully, they are always Exited (137).
Currently the workaround is to force-kill it by adding stop_signal: SIGKILL to each container that is too long to stop, or stop_grace_period: 3s to kill it in 3 seconds (instead of 10 seconds).