docker.recipes

ERPNext Complete ERP

advanced

Full-featured open-source ERP with CRM, inventory, accounting, and HR.

Overview

ERPNext is a comprehensive open-source Enterprise Resource Planning (ERP) system built on the Frappe framework, a Python-based web application framework that provides a complete business management solution. Originally developed by Frappe Technologies, ERPNext integrates modules for Customer Relationship Management (CRM), Human Resources, Inventory Management, Accounting, Manufacturing, and Project Management into a unified platform that rivals commercial ERP solutions like SAP and Oracle at a fraction of the cost. This Docker stack orchestrates ERPNext with MariaDB as the primary database, while three separate Redis instances handle distinct workloads: redis-cache for application-level caching, redis-queue for background job processing, and redis-socketio for real-time WebSocket communications. The architecture includes dedicated worker containers for different queue types (default, short, and long-running tasks) plus a scheduler container for automated processes, creating a production-ready ERP deployment that can handle concurrent users and complex business workflows. Small to medium enterprises, growing businesses, and organizations seeking to replace expensive proprietary ERP systems will find this stack particularly valuable, as it provides enterprise-grade functionality including multi-company support, role-based permissions, custom field creation, and extensive reporting capabilities while maintaining the flexibility to customize business processes through Frappe's low-code development environment.

Key Features

  • Multi-queue Redis architecture separating cache operations, background jobs, and real-time communications for optimal performance
  • Dedicated worker containers handling default, short, and long-running tasks with automatic job distribution
  • MariaDB with UTF8MB4 character set for full Unicode support including emojis and international characters
  • Integrated Frappe framework providing low-code customization, custom DocTypes, and workflow automation
  • Built-in scheduler container for automated processes like email sending, report generation, and data synchronization
  • Complete ERP modules including GL accounting with multi-currency support, inventory with serial/batch tracking, and manufacturing with Bill of Materials
  • Role-based permission system with user, role, and permission level controls across all business documents
  • Multi-site architecture allowing multiple companies or subsidiaries within a single ERPNext instance

Common Use Cases

  • 1Manufacturing companies needing integrated production planning, inventory control, and financial accounting
  • 2Service businesses requiring project management, timesheet tracking, and client billing automation
  • 3Retail organizations managing multi-location inventory, point-of-sale systems, and customer loyalty programs
  • 4Growing startups transitioning from spreadsheets and disparate tools to unified business management
  • 5Non-profit organizations needing donor management, grant tracking, and financial transparency reporting
  • 6Educational institutions managing student information, fee collection, and academic records
  • 7Healthcare practices requiring patient management, appointment scheduling, and billing integration

Prerequisites

  • Minimum 4GB RAM (8GB recommended for production) to support ERPNext application and multiple worker processes
  • Docker Engine 20.10+ and Docker Compose V2 for proper container orchestration and networking
  • Available ports 8080 for ERPNext web interface and internal Redis ports for service communication
  • Basic understanding of ERP concepts and business processes for effective system configuration
  • Familiarity with Frappe framework concepts like DocTypes, workflows, and custom scripts for customization
  • SSL certificate and domain name for production deployments requiring secure HTTPS access

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 erpnext:
3 image: frappe/erpnext:v15
4 container_name: erpnext
5 environment:
6 - FRAPPE_SITE_NAME_HEADER=${SITE_NAME}
7 volumes:
8 - sites-data:/home/frappe/frappe-bench/sites
9 - logs-data:/home/frappe/frappe-bench/logs
10 ports:
11 - "8080:8080"
12 depends_on:
13 - db
14 - redis-cache
15 - redis-queue
16 - redis-socketio
17 networks:
18 - erpnext-network
19 restart: unless-stopped
20
21 scheduler:
22 image: frappe/erpnext:v15
23 container_name: erpnext-scheduler
24 command: bench schedule
25 volumes:
26 - sites-data:/home/frappe/frappe-bench/sites
27 - logs-data:/home/frappe/frappe-bench/logs
28 depends_on:
29 - erpnext
30 networks:
31 - erpnext-network
32 restart: unless-stopped
33
34 worker-default:
35 image: frappe/erpnext:v15
36 container_name: erpnext-worker-default
37 command: bench worker --queue default
38 volumes:
39 - sites-data:/home/frappe/frappe-bench/sites
40 - logs-data:/home/frappe/frappe-bench/logs
41 depends_on:
42 - erpnext
43 networks:
44 - erpnext-network
45 restart: unless-stopped
46
47 worker-short:
48 image: frappe/erpnext:v15
49 container_name: erpnext-worker-short
50 command: bench worker --queue short
51 volumes:
52 - sites-data:/home/frappe/frappe-bench/sites
53 - logs-data:/home/frappe/frappe-bench/logs
54 depends_on:
55 - erpnext
56 networks:
57 - erpnext-network
58 restart: unless-stopped
59
60 worker-long:
61 image: frappe/erpnext:v15
62 container_name: erpnext-worker-long
63 command: bench worker --queue long
64 volumes:
65 - sites-data:/home/frappe/frappe-bench/sites
66 - logs-data:/home/frappe/frappe-bench/logs
67 depends_on:
68 - erpnext
69 networks:
70 - erpnext-network
71 restart: unless-stopped
72
73 db:
74 image: mariadb:10.11
75 container_name: erpnext-db
76 environment:
77 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
78 - MYSQL_DATABASE=erpnext
79 command:
80 - --character-set-server=utf8mb4
81 - --collation-server=utf8mb4_unicode_ci
82 - --skip-character-set-client-handshake
83 volumes:
84 - mariadb-data:/var/lib/mysql
85 networks:
86 - erpnext-network
87 restart: unless-stopped
88
89 redis-cache:
90 image: redis:7-alpine
91 container_name: erpnext-redis-cache
92 networks:
93 - erpnext-network
94 restart: unless-stopped
95
96 redis-queue:
97 image: redis:7-alpine
98 container_name: erpnext-redis-queue
99 networks:
100 - erpnext-network
101 restart: unless-stopped
102
103 redis-socketio:
104 image: redis:7-alpine
105 container_name: erpnext-redis-socketio
106 networks:
107 - erpnext-network
108 restart: unless-stopped
109
110volumes:
111 sites-data:
112 logs-data:
113 mariadb-data:
114
115networks:
116 erpnext-network:
117 driver: bridge

.env Template

.env
1# ERPNext
2SITE_NAME=erp.localhost
3DB_ROOT_PASSWORD=secure_root_password

Usage Notes

  1. 1Web UI at http://localhost:8080
  2. 2Create new site: bench new-site sitename
  3. 3Modules: CRM, HR, Inventory, Accounting
  4. 4Requires initial setup wizard
  5. 5Minimum 4GB RAM recommended

Individual Services(9 services)

Copy individual services to mix and match with your existing compose files.

erpnext
erpnext:
  image: frappe/erpnext:v15
  container_name: erpnext
  environment:
    - FRAPPE_SITE_NAME_HEADER=${SITE_NAME}
  volumes:
    - sites-data:/home/frappe/frappe-bench/sites
    - logs-data:/home/frappe/frappe-bench/logs
  ports:
    - "8080:8080"
  depends_on:
    - db
    - redis-cache
    - redis-queue
    - redis-socketio
  networks:
    - erpnext-network
  restart: unless-stopped
scheduler
scheduler:
  image: frappe/erpnext:v15
  container_name: erpnext-scheduler
  command: bench schedule
  volumes:
    - sites-data:/home/frappe/frappe-bench/sites
    - logs-data:/home/frappe/frappe-bench/logs
  depends_on:
    - erpnext
  networks:
    - erpnext-network
  restart: unless-stopped
worker-default
worker-default:
  image: frappe/erpnext:v15
  container_name: erpnext-worker-default
  command: bench worker --queue default
  volumes:
    - sites-data:/home/frappe/frappe-bench/sites
    - logs-data:/home/frappe/frappe-bench/logs
  depends_on:
    - erpnext
  networks:
    - erpnext-network
  restart: unless-stopped
worker-short
worker-short:
  image: frappe/erpnext:v15
  container_name: erpnext-worker-short
  command: bench worker --queue short
  volumes:
    - sites-data:/home/frappe/frappe-bench/sites
    - logs-data:/home/frappe/frappe-bench/logs
  depends_on:
    - erpnext
  networks:
    - erpnext-network
  restart: unless-stopped
worker-long
worker-long:
  image: frappe/erpnext:v15
  container_name: erpnext-worker-long
  command: bench worker --queue long
  volumes:
    - sites-data:/home/frappe/frappe-bench/sites
    - logs-data:/home/frappe/frappe-bench/logs
  depends_on:
    - erpnext
  networks:
    - erpnext-network
  restart: unless-stopped
db
db:
  image: mariadb:10.11
  container_name: erpnext-db
  environment:
    - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
    - MYSQL_DATABASE=erpnext
  command:
    - "--character-set-server=utf8mb4"
    - "--collation-server=utf8mb4_unicode_ci"
    - "--skip-character-set-client-handshake"
  volumes:
    - mariadb-data:/var/lib/mysql
  networks:
    - erpnext-network
  restart: unless-stopped
redis-cache
redis-cache:
  image: redis:7-alpine
  container_name: erpnext-redis-cache
  networks:
    - erpnext-network
  restart: unless-stopped
redis-queue
redis-queue:
  image: redis:7-alpine
  container_name: erpnext-redis-queue
  networks:
    - erpnext-network
  restart: unless-stopped
redis-socketio
redis-socketio:
  image: redis:7-alpine
  container_name: erpnext-redis-socketio
  networks:
    - erpnext-network
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 erpnext:
5 image: frappe/erpnext:v15
6 container_name: erpnext
7 environment:
8 - FRAPPE_SITE_NAME_HEADER=${SITE_NAME}
9 volumes:
10 - sites-data:/home/frappe/frappe-bench/sites
11 - logs-data:/home/frappe/frappe-bench/logs
12 ports:
13 - "8080:8080"
14 depends_on:
15 - db
16 - redis-cache
17 - redis-queue
18 - redis-socketio
19 networks:
20 - erpnext-network
21 restart: unless-stopped
22
23 scheduler:
24 image: frappe/erpnext:v15
25 container_name: erpnext-scheduler
26 command: bench schedule
27 volumes:
28 - sites-data:/home/frappe/frappe-bench/sites
29 - logs-data:/home/frappe/frappe-bench/logs
30 depends_on:
31 - erpnext
32 networks:
33 - erpnext-network
34 restart: unless-stopped
35
36 worker-default:
37 image: frappe/erpnext:v15
38 container_name: erpnext-worker-default
39 command: bench worker --queue default
40 volumes:
41 - sites-data:/home/frappe/frappe-bench/sites
42 - logs-data:/home/frappe/frappe-bench/logs
43 depends_on:
44 - erpnext
45 networks:
46 - erpnext-network
47 restart: unless-stopped
48
49 worker-short:
50 image: frappe/erpnext:v15
51 container_name: erpnext-worker-short
52 command: bench worker --queue short
53 volumes:
54 - sites-data:/home/frappe/frappe-bench/sites
55 - logs-data:/home/frappe/frappe-bench/logs
56 depends_on:
57 - erpnext
58 networks:
59 - erpnext-network
60 restart: unless-stopped
61
62 worker-long:
63 image: frappe/erpnext:v15
64 container_name: erpnext-worker-long
65 command: bench worker --queue long
66 volumes:
67 - sites-data:/home/frappe/frappe-bench/sites
68 - logs-data:/home/frappe/frappe-bench/logs
69 depends_on:
70 - erpnext
71 networks:
72 - erpnext-network
73 restart: unless-stopped
74
75 db:
76 image: mariadb:10.11
77 container_name: erpnext-db
78 environment:
79 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
80 - MYSQL_DATABASE=erpnext
81 command:
82 - --character-set-server=utf8mb4
83 - --collation-server=utf8mb4_unicode_ci
84 - --skip-character-set-client-handshake
85 volumes:
86 - mariadb-data:/var/lib/mysql
87 networks:
88 - erpnext-network
89 restart: unless-stopped
90
91 redis-cache:
92 image: redis:7-alpine
93 container_name: erpnext-redis-cache
94 networks:
95 - erpnext-network
96 restart: unless-stopped
97
98 redis-queue:
99 image: redis:7-alpine
100 container_name: erpnext-redis-queue
101 networks:
102 - erpnext-network
103 restart: unless-stopped
104
105 redis-socketio:
106 image: redis:7-alpine
107 container_name: erpnext-redis-socketio
108 networks:
109 - erpnext-network
110 restart: unless-stopped
111
112volumes:
113 sites-data:
114 logs-data:
115 mariadb-data:
116
117networks:
118 erpnext-network:
119 driver: bridge
120EOF
121
122# 2. Create the .env file
123cat > .env << 'EOF'
124# ERPNext
125SITE_NAME=erp.localhost
126DB_ROOT_PASSWORD=secure_root_password
127EOF
128
129# 3. Start the services
130docker compose up -d
131
132# 4. View logs
133docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/erpnext-complete/run | bash

Troubleshooting

  • ERPNext shows 'Redis connection failed': Check if all three Redis containers (cache, queue, socketio) are running and accessible on the erpnext-network
  • Site creation fails with 'Database connection error': Verify MariaDB container started successfully and MYSQL_ROOT_PASSWORD environment variable matches between services
  • Background jobs not processing: Restart worker containers (worker-default, worker-short, worker-long) and check Redis queue container logs for connection issues
  • High memory usage during large imports: Increase Docker host memory allocation and consider processing data in smaller batches through ERPNext's data import tool
  • ERPNext web interface returns 502 errors: Check if sites-data volume contains proper site configuration and bench processes are running correctly inside the main ERPNext container
  • Scheduler jobs not running automatically: Verify the scheduler container is running and has proper access to sites-data volume with correct file permissions

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

erpnextfrappemariadbredis-cacheredis-queueredis-socketio

Tags

#erp#crm#accounting#inventory#erpnext

Category

Full Web Stacks
Ad Space