This collection of bash scripts simplifies the setup of ERPNext using Docker Compose. It will create the .scripts directory and all necessary environment files.
Read https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
Feel free to use any location. Home directory is fine.
git clone https://github.com/clicktrend/erpnext_docker_scripts.git
cd erpnext_docker_scriptschmod +x scripts/*scripts/setup.shAfter 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.shChange your DNS to the site you entered.
scripts/traefik-docker.sh up# Other tasks
scripts/traefik-docker.sh down
scripts/traefik-docker.sh logsGo to the Traefik dashboard with the domain you entered and log in with "admin" and the password you set!
scripts/mariadb-setup.shscripts/mariadb-docker.sh up# Other tasks
scripts/mariadb-docker.sh down
scripts/mariadb-docker.sh logsTO reinstall delete mariadb volume before
scripts/erpnext-setup.shscripts/erpnext-docker.sh up# Other tasks
scripts/erpnext-docker.sh down
scripts/erpnext-docker.sh logsCheck the Traefik dashboard to see if the router has started.
scripts/erpnext-create-site.shscripts/erpnext-custom-setup.shscripts/erpnext-docker.sh down
scripts/erpnext-custom-docker.sh upIf 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_TAGin.env - Run
scripts/erpnext-custom-setup.sh - Run
scripts/erpnext-custom-docker.sh up - Run
scripts/erpnext-backend.sh bench use one.example.comto set default --site parameter 6a. Runscripts/erpnext-backend.sh bench get-app --branch version-15 hrms6b. Runscripts/erpnext-backend.sh bench install-app hrms - Run
scripts/erpnext-backend.sh bench migrate - Run
scripts/erpnext-backend.sh bench build - Stop and start containers
scripts/erpnext-custom-docker.sh downandscripts/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-appsTo 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/nullTo 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
To deploy new version do these following steps
- Sync your git and tag new Version e.g. 0.0.2
- Update tag version in apps.json
- update ERPNEXT_CUSTOM_TAG
- Run
scripts/erpnext-custom-setup.shand wait for successfull image build - Stop and start services
Run
scripts/erpnext-custom-docker.sh downRunscripts/erpnext-custom-docker.sh up - Run
scripts/erpnext-backend.sh bench migrate - Run
scripts/erpnext-backend.sh bench build - Stop and start services
Run
scripts/erpnext-custom-docker.sh downRunscripts/erpnext-custom-docker.sh up