PDL Frappe - Deployment
This document covers everything you need to know about deploying your Frappe ecosystem to a live production Virtual Private Server (VPS). Whether using your own Docker image or a PDL Frappe release, you can follow this guide.
Deployment folder
We recommend taking a launch//deploy/ directory containing:
custom-frappe-v16.tar: Pre-compiled Docker image containing all custom applications.compose.yaml&overrides/: Orchestration files for Docker to network the databases and web servers.secrets/: Secure credentials (e.g., database passwords).apps.json: Manifest of installed applications.
Step-by-Step Deployment
1. Load the pre-compiled image
docker load -i custom-frappe-v16.tar
2. Boot the Cluster
Start the database, Redis, and backend workers in detached mode:
docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.mariadb-secrets.yaml -f overrides/compose.redis.yaml -f overrides/compose.noproxy.yaml up -d
3. Provision the Production Database
Run the final setup script to install the tables for your apps on your live domain (frappe.example.org).
Ensure you change PASSWORD below to whatever you want the master frontend login password to be.
db_password=$(cat secrets/db_password.txt | tr -d '\n')
docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.mariadb-secrets.yaml -f overrides/compose.redis.yaml -f overrides/compose.noproxy.yaml \
exec backend bench new-site frappe.example.org \
--force \
--no-mariadb-socket \
--db-root-password "$db_password" \
--admin-password "PASSWORD" \
--install-app erpnext \
--install-app hrms \
--install-app crm \
--install-app helpdesk \
--install-app lms \
--install-app builder \
--install-app wiki \
--install-app lending \
--install-app payments \
--install-app telephony
Ensure to update the --install-app <app> to fit your apps.
Ensure to update the frappe.example.org to your domain.
4. Set the Default Site
Tell the Frappe router to automatically serve your site when someone visits the VPS IP address:
docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.mariadb-secrets.yaml -f overrides/compose.redis.yaml -f overrides/compose.noproxy.yaml exec backend bench use frappe.example.org
Ensure to update the frappe.example.org to your domain.