Everything about Frappe and ERPNext in containers.
To get started you need Docker, docker-compose, and git setup on your machine. For Docker basics and best practices refer to Docker's documentation.
Once completed, chose one of the following two sections for next steps.
To play in an already set up sandbox, in your browser, click the button below:
First clone the repo:
git clone https://github.com/frappe/frappe_docker
cd frappe_docker
Then run: docker compose -f pwd.yml up -d
After cloning the repo run this command to build multi-architecture images specifically for ARM64.
docker buildx bake --no-cache --set "*.platform=linux/arm64"
and then
- add
platform: linux/arm64
to all services in thepwd.yml
- replace the current specified versions of erpnext image on
pwd.yml
with:latest
Then run: docker compose -f pwd.yml up -d
Wait for 5 minutes for ERPNext site to be created or check create-site
container logs before opening browser on port 8080. (username: Administrator
, password: admin
)
If you ran in a Dev Docker environment, to view container logs: docker compose -f pwd.yml logs -f create-site
. Don't worry about some of the initial error messages, some services take a while to become ready, and then they go away.
- List of containers
- Single Compose Setup
- Environment Variables
- Single Server Example
- Setup Options
- Site Operations
- Backup and Push Cron Job
- Port Based Multi Tenancy
- Migrate from multi-image setup
- running on linux/mac
- TLS for local deployment
If you want to contribute to this repo refer to CONTRIBUTING.md
This repository is only for container related stuff. You also might want to contribute to:
A command-line interface for managing Frappe Docker containers.
The CLI uses a config.json
file to store configuration. You can create one by copying config.sample.json
and modifying it, or use the config
command:
./cli.py config --frappe-path /path/to/frappe_docker \
--backup-database /path/to/backup/database.sql.gz \
--backup-public-files /path/to/backup/public-files.tar \
--backup-private-files /path/to/backup/private-files.tar \
--docker-compose-file pwd.yml \
--platform linux/arm64 \
--container-prefix your_prefix
frappe_path
: Path to your Frappe Docker installationbackup_paths
: Paths to your backup filesdatabase
: Path to database backup filepublic_files
: Path to public files backupprivate_files
: Path to private files backup
docker_compose_file
: Name of your Docker Compose file (default: pwd.yml)platform
: Docker platform (linux/arm64 for M1/M2 Macs, linux/amd64 for Intel)container_names
: Container name prefixesbackend
: Backend container name prefixfrontend
: Frontend container name prefix
config
: Configure paths and settingsbuild
: Build the Frappe Docker imagerun
: Start the Frappe Docker containersrestart
: Restart the Frappe Docker containersremove
: Remove Frappe Docker containers, volumes, and networksmigrate
: Run database migrationsrestore_db
: Restore the database from backuprestore_files
: Restore files from backuprestore_lms
: Install and restore LMS apprestore_hrms
: Install and restore HRMS app
# Configure the CLI
./cli.py config --frappe-path /path/to/frappe_docker
# Build and run the containers
./cli.py build
./cli.py run
# Restore from backup
./cli.py restore_db
./cli.py restore_files
# Install additional apps
./cli.py restore_lms
./cli.py restore_hrms
The CLI is built using Click and Python. Each command corresponds to one of the shell scripts in the directory. The shell scripts use the configuration from config.json
to determine paths and settings.