This collection of bash scripts simplifies the setup of ERPNext using Docker Compose. It will create the .scripts
directory and all necessary environment files.
Feel free to use any location. Home directory is fine.
git clone https://github.com/clicktrend/erpnext_docker_scripts.git
cd erpnext_docker_scripts
chmod +x scripts/*
scripts/setup.sh
After the first run, the .env
file is created. Edit this file if needed and change INSTALLED
to true
. Run the script again:
scripts/setup.sh
.configs
directory will be created. Most files will be created inside this directory in the next steps. Project frappe_docker
will be cloned into .frappe_docker
.
scripts/traefik-setup.sh
Change your DNS to the site you entered.
scripts/traefik-docker.sh up
# Other tasks
scripts/traefik-docker.sh down
scripts/traefik-docker.sh logs
Go to the Traefik dashboard with the domain you entered and log in with "admin" and the password you set!
scripts/mariadb-setup.sh
scripts/mariadb-docker.sh up
# Other tasks
scripts/mariadb-docker.sh down
scripts/mariadb-docker.sh logs
scripts/erpnext-setup.sh
scripts/erpnext-docker.sh up
# Other tasks
scripts/erpnext-docker.sh down
scripts/erpnext-docker.sh logs
Check the Traefik dashboard to see if the router has started.
scripts/erpnext-create-site.sh
scripts/erpnext-custom-setup.sh
scripts/erpnext-docker.sh down
scripts/erpnext-custom-docker.sh up
If apps.json
does not exist in the .configs
directory, a template will be copied from the .frappe_docker
directory. Change apps.json
and run the command again.
Depending on your installation, install apps and migrate the system. See the Helper section.
Use domain you entered with --site
parameter.
- Change
apps.json
- Change
ERPNEXT_CUSTOM_TAG
in.env
- Run
scripts/erpnext-custom-setup.sh
- Run
scripts/erpnext-custom-docker.sh up
- Run
scripts/erpnext-backend.sh bench --site one.example.com install-app hrms
- Run
scripts/erpnext-backend.sh bench --site one.example.com migrate
- Run
scripts/erpnext-backend.sh bench --site one.example.com build
- Stop and start containers
scripts/erpnext-custom-docker.sh down
andscripts/erpnext-custom-docker.sh up
Use this command to run bench
in the backend. The backend
container must be running.
scripts/erpnext-backend.sh bench
# Examples
scripts/erpnext-backend.sh bench --site one.example.com install-app hrms
scripts/erpnext-backend.sh bench --site one.example.com migrate
scripts/erpnext-backend.sh bench --site one.example.com build
scripts/erpnext-backend.sh bench --site one.example.com list-apps
To backup run manually scripts/erpnext-backup.sh
.
Or add this line to cronjob of the server.
0 */6 * * * /path_to/scripts/erpnext-backup.sh > /dev/null
To activate restic edit backup section in .env
, uncomment command lines from resources/backup-job.yaml
and rerun scripts/erpnext-setup.sh
and scripts/erpnext-custom-setup.sh