Frappe_docker - how to start from scratch when things fail?

Continuing the discussion from Official Docker Updates 2020:

I have continuing trouble getting a " Local deployment for testing" instance running. I fail with the 3rd step in the setup process (creating a new site and installing ERPNext) over and over again.
I guess the use of the environment variables (either directly in the docker exec or by defining the variables in the installation/.env file is where things go wrong.

So I am making new attempts since the release and would like to confirm how I can make sure that I really am starting from an empty page.

Does docker-compose ... down clear everything there was? Or is there more to it?

Docker Cleanup Commands Gist: docker cleanup guide: containers, images, volumes, networks · GitHub

Delete and recreate sites directory:

rm -fr installation/sites && mkdir installation/sites

New site step without env variables:

Assumption is installation/.env is same as env-example

docker exec -it \
    -e "SITE_NAME=coolnameforsite.localhost" \
    -e "DB_ROOT_USER=root" \
    -e "MYSQL_ROOT_PASSWORD=admin" \
    -e "ADMIN_PASSWORD=admin_password_for_coolsite" \
    -e "INSTALL_APPS=erpnext" \
    <project-name>_erpnext-python_1 new

Note: SITE_NAME ends with .localhost if you need to try things locally.

Get familiar with docker-compose locally. I’m working on docker swarm for production.

Here are my notes : GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext
(I managed to get mariadb master slave replication working here)

I’ll add swarm directory under installation and add appropriate docs once I migrate all my production sites to docker
I’m working on backup cron to push backed up files to s3 and way to restore from volume or s3 whichever available.

1 Like