Prerequisites
Ensure you have the following installed:- Docker (20.10 or higher)
- Docker Compose (v2.0 or higher)
- Git
Refer to the Docker documentation for installation instructions specific to your operating system.
Quick Start
Download Docker configuration
Download the required Docker files from the repository:
View docker-compose.yml structure
View docker-compose.yml structure
The compose file includes three services:
- mariadb: Database server (MariaDB 10.8)
- redis: Cache and queue backend (Redis Alpine)
- frappe: Frappe application server with Bench
Start the containers
Launch all services in detached mode:This command:
- Downloads the required Docker images
- Creates containers for MariaDB, Redis, and Frappe
- Runs the initialization script
- Sets up the Helpdesk site
Container Architecture
The Docker setup includes three interconnected services:MariaDB Container
- Image:
mariadb:10.8 - Configuration:
- Character set:
utf8mb4 - Collation:
utf8mb4_unicode_ci - Root password:
123(for development only)
- Character set:
- Persistent storage:
mariadb-datavolume
Redis Container
- Image:
redis:alpine - Purpose: Caching, background job queues, and real-time updates
Frappe Container
- Image:
frappe/bench:latest - Exposed ports:
8000: Web server (Frappe backend)9000: SocketIO server (real-time updates)
- Working directory:
/home/frappe - Volume mount: Current directory mounted to
/workspace
Development Workflow
Viewing logs
Monitor container logs in real-time:Executing commands in containers
Run commands inside the Frappe container:Accessing the container shell
Get a bash shell inside the Frappe container:Restarting services
Restart specific services after configuration changes:Stopping and starting
Frontend Development
To develop the Vue 3 frontend with hot module replacement:Database Access
Connect to MariaDB directly:Redis Access
Connect to Redis CLI:Persistence and Data
Data volumes
The setup creates a Docker volume for MariaDB:Backing up data
Create a backup of your site:/home/frappe/frappe-bench/sites/helpdesk.localhost/private/backups/
Restoring data
Restore from a backup:Customizing the Setup
Environment variables
Create a.env file in your project directory:
docker-compose.yml:
Custom domain
To use a custom domain instead ofhelpdesk.localhost:
-
Update your
/etc/hostsfile: -
Modify the initialization script or create a site manually:
Common Development Tasks
Install additional apps
Clear cache
Rebuild assets
Run tests
Update Frappe Framework
Troubleshooting
Container won’t start
Check logs for errors:Port already in use
Modify ports indocker-compose.yml:
Permission errors
The Frappe container runs as thefrappe user. If you encounter permission issues with mounted volumes:
Database connection errors
Ensure all containers are running:Out of memory errors
Increase Docker Desktop memory allocation in Settings > Resources.Performance Optimization
Enable BuildKit
For faster builds, enable Docker BuildKit:Volume mount performance (macOS/Windows)
On macOS and Windows, Docker volume performance can be slow. Consider using named volumes for better performance:Next Steps
- Explore the Architecture Overview to understand the system design
- Review the Local Setup guide for non-Docker development
- Check the GitHub repository for the latest updates