Docker-based setup for Frappe/ERPNext: a base image (Frappe + core apps) and an optional custom image (base + custom apps). Includes a pwd.yml stack compatible with official frappe_docker for local/dev use.
| Path | Purpose |
|---|---|
Dockerfile.base |
Base image: Frappe + optional core apps (ERPNext, Education, HRMS, Helpdesk, etc.). |
Dockerfile.custom |
Custom image: extends base, installs apps from resources/custom/apps.json and builds only those apps’ assets. |
pwd.yml |
Compose stack (backend, frontend, configurator, create-site, queue, scheduler, websocket, db, redis). |
resources/base/apps.json |
Core apps for the base image (url + branch per app). |
resources/custom/apps.json |
Custom apps for the custom image (url, branch, optional name for asset build). |
resources/core/nginx/ |
Nginx template and entrypoint for the frontend service. |
- Internet during build: image builds clone Frappe and apps from GitHub (and any Git hosts in your app lists). If you see
Failed to connect to github.com port 443, fix outbound HTTPS for Docker.
Run all commands from the repo root.
Installs Frappe and the apps listed in resources/base/apps.json.
Windows (PowerShell):
$baseB64 = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes((Get-Content -Raw resources\base\apps.json)))
docker build -f Dockerfile.base --build-arg BASE_APPS_JSON_BASE64="$baseB64" -t frappe-base:latest .Linux / macOS:
docker build -f Dockerfile.base --build-arg BASE_APPS_JSON_BASE64="$(base64 -w0 resources/base/apps.json)" -t frappe-base:latest .Frappe only (no base apps):
docker build -f Dockerfile.base -t frappe-base:latest .
Adds apps from resources/custom/apps.json. Each entry can include optional "name" (bench app name); when present, only those apps’ assets are built (no full bench build).
Windows (PowerShell):
$customB64 = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes((Get-Content -Raw resources\custom\apps.json)))
docker build -f Dockerfile.custom --build-arg BASE_IMAGE=frappe-base:latest --build-arg APPS_JSON_BASE64="$customB64" -t frappe-custom:latest .Linux / macOS:
docker build -f Dockerfile.custom --build-arg BASE_IMAGE=frappe-base:latest --build-arg APPS_JSON_BASE64="$(base64 -w0 resources/custom/apps.json)" -t frappe-custom:latest .No custom apps:
docker build -f Dockerfile.custom --build-arg BASE_IMAGE=frappe-base:latest -t frappe-custom:latest .
Uses frappe-base:latest by default. To use the custom image:
# Default: base image
docker compose -f pwd.yml up -d
# Custom image
CUSTOM_IMAGE=frappe-custom CUSTOM_TAG=latest docker compose -f pwd.yml up -dWait ~10–15 minutes for create-site to finish (it creates site frontend and installs all base + custom apps). Then open http://localhost:8080 (Administrator / admin).
To recreate the site and run create-site again (fresh install of all apps):
docker compose -f pwd.yml run --rm backend bench --site frontend drop-site --force
docker compose -f pwd.yml up -d --force-recreate create-site
docker compose -f pwd.yml logs -f create-site# List installed apps
docker compose -f pwd.yml exec backend bench --site frontend list-apps
# Install one or more apps (use your app names from custom/base apps.json)
docker compose -f pwd.yml exec backend bench --site frontend install-app menumate
# Or multiple: install-app education, hrms, helpdesk, dfp_external_storage, frappe_pdf, menumateIf the backend container is not running, use a one-off run:
docker compose -f pwd.yml run --rm backend bench --site frontend install-app menumate- Push your changes to the Git repo/branch referenced in
resources/custom/apps.json. - Rebuild the custom image (Step 2 above).
- Redeploy so containers use the new image:
docker compose -f pwd.yml up -d --force-recreate
- Migrate and clear cache (and rebuild assets if you changed frontend code):
docker compose -f pwd.yml exec backend bench --site frontend migrate docker compose -f pwd.yml exec backend bench build --app menumate docker compose -f pwd.yml exec backend bench --site frontend clear-cache
- Base / custom:
[{"url": "https://github.com/org/repo.git", "branch": "main"}] - Custom only: optional
"name": "app_name"per entry. When set, only that app’s assets are built (bench build --app app_name), so other apps (e.g. helpdesk) are not rebuilt.
The frontend service uses resources/core/nginx/nginx-template.conf and nginx-entrypoint.sh; the entrypoint fills env vars (e.g. BACKEND, SOCKETIO) and starts Nginx.
- ARCHITECTURE.md – Image layout, build strategy, and deployment checklist.