-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
121 lines (114 loc) · 3.5 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
121 lines (114 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: erpnext-dev
# Keep local development and GitHub Actions on the same immutable image set.
# The manifest-list digests select the matching AMD64/ARM64 image automatically.
x-images:
mariadb: &mariadb-image docker.io/mariadb:11.8@sha256:efb4959ef2c835cd735dbc388eb9ad6aab0c78dd64febcd51bc17481111890c4
redis: &redis-image docker.io/redis:alpine@sha256:978f0e01593e65eed801f2402944efcd936d43b5027e4908a7897baf88ed6241
frappe-bench: &frappe-bench-image docker.io/frappe/bench:latest@sha256:2578ab74eb82f7f264ce33235d5631c8a1289deeab2a1422bc76d738b8e6d219
services:
mariadb:
image: *mariadb-image
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
environment:
MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-123}
MARIADB_AUTO_UPGRADE: '1'
healthcheck:
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
interval: 5s
timeout: 5s
retries: 30
volumes:
- mariadb-data:/var/lib/mysql
restart: unless-stopped
redis-cache:
image: *redis-image
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 3s
retries: 20
volumes:
- redis-cache-data:/data
restart: unless-stopped
redis-queue:
image: *redis-image
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 3s
retries: 20
volumes:
- redis-queue-data:/data
restart: unless-stopped
setup:
image: *frappe-bench-image
command: ['bash', '/workspace/docker/setup.sh']
environment:
BENCH_DIR: /workspace/frappe-bench
SITE_NAME: ${SITE_NAME:-erpnext.localhost}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin}
DB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-123}
working_dir: /workspace
volumes:
- bench-data:/workspace/frappe-bench
- ../erpnext:/workspace/erpnext:cached
- ./docker:/workspace/docker:ro
- erpnext-node-modules:/workspace/erpnext/node_modules
- banking-node-modules:/workspace/erpnext/banking/node_modules
depends_on:
mariadb:
condition: service_healthy
redis-cache:
condition: service_healthy
redis-queue:
condition: service_healthy
frappe:
image: *frappe-bench-image
command:
- bash
- -lc
- >-
sudo rmdir /sites 2>/dev/null || true;
sudo ln -sfn /workspace/frappe-bench/sites /sites &&
sed -E -i 's|^web: bench serve[[:space:]]+--port 8000.*$|web: bench serve --port 8000 --host 0.0.0.0|' Procfile &&
cat Procfile &&
bench start
environment:
BENCH_DIR: /workspace/frappe-bench
SITE_NAME: ${SITE_NAME:-erpnext.localhost}
working_dir: /workspace/frappe-bench
ports:
- '8000:8000'
- '9000:9000'
volumes:
- bench-data:/workspace/frappe-bench
- ../erpnext:/workspace/erpnext:cached
- erpnext-node-modules:/workspace/erpnext/node_modules
- banking-node-modules:/workspace/erpnext/banking/node_modules
depends_on:
setup:
condition: service_completed_successfully
healthcheck:
test:
[
'CMD',
'curl',
'--fail',
'--silent',
'http://127.0.0.1:8000/api/method/ping',
]
interval: 10s
timeout: 5s
retries: 30
start_period: 30s
restart: unless-stopped
volumes:
bench-data:
mariadb-data:
redis-cache-data:
redis-queue-data:
erpnext-node-modules:
banking-node-modules: