forked from frappe/frappe_docker
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.arm64.yml
201 lines (187 loc) · 5.66 KB
/
docker-compose.arm64.yml
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
version: '3'
services:
traefik:
image: 'traefik:v2.2'
command:
- '--log.level=DEBUG'
- '--providers.docker=true'
- '--providers.docker.exposedbydefault=false'
- '--entrypoints.web.address=:80'
- '--entrypoints.websecure.address=:443'
- '--certificatesresolvers.myresolver.acme.httpchallenge=true'
- '--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web'
- '--certificatesresolvers.myresolver.acme.email=${LETSENCRYPT_EMAIL}'
- '--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json'
labels:
# enable traefik
- 'traefik.enable=true'
# global redirect to https for production only
- '${HTTPS_REDIRECT_RULE_LABEL}'
- '${HTTPS_REDIRECT_ENTRYPOINT_LABEL}'
- '${HTTPS_REDIRECT_MIDDLEWARE_LABEL}'
# middleware redirect for production only
- '${HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL}'
ports:
- '80:80'
- '443:443'
volumes:
- cert-vol:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
erpnext-nginx:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-nginx:${ERPNEXT_VERSION}
platform: linux/arm64
build:
context: .
dockerfile: build/erpnext-nginx/arm64.Dockerfile
args:
FRAPPE_VERSION: ${FRAPPE_VERSION}
ERPNEXT_VERSION: ${ERPNEXT_VERSION}
DOCKER_REGISTRY_PREFIX: ${DOCKER_REGISTRY_PREFIX}
restart: on-failure
environment:
- FRAPPE_PY=erpnext-python
- FRAPPE_PY_PORT=8000
- FRAPPE_SOCKETIO=frappe-socketio
- SOCKETIO_PORT=9000
- HTTP_TIMEOUT=${HTTP_TIMEOUT}
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.erpnext-nginx.rule=Host(${SITES})'
- '${ENTRYPOINT_LABEL}'
- '${CERT_RESOLVER_LABEL}'
- 'traefik.http.services.erpnext-nginx.loadbalancer.server.port=80'
volumes:
- sites-vol:/var/www/html/sites:rw
- assets-vol:/assets:rw
erpnext-python:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:${ERPNEXT_VERSION}
platform: linux/arm64
build:
context: .
dockerfile: build/erpnext-worker/arm64.Dockerfile
args:
FRAPPE_VERSION: ${FRAPPE_VERSION}
APP_BRANCH: ${ERPNEXT_VERSION}
DOCKER_REGISTRY_PREFIX: ${DOCKER_REGISTRY_PREFIX}
restart: on-failure
environment:
- MARIADB_HOST=${MARIADB_HOST}
- REDIS_CACHE=redis-cache:6379
- REDIS_QUEUE=redis-queue:6379
- REDIS_SOCKETIO=redis-socketio:6379
- SOCKETIO_PORT=9000
- AUTO_MIGRATE=1
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
frappe-socketio:
image: ${DOCKER_REGISTRY_PREFIX}/frappe-socketio:${FRAPPE_VERSION}
platform: linux/arm64
build:
context: .
dockerfile: build/frappe-socketio/arm64.Dockerfile
args:
FRAPPE_VERSION: ${FRAPPE_VERSION}
restart: on-failure
depends_on:
- redis-socketio
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
erpnext-worker-default:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:${ERPNEXT_VERSION}
platform: linux/arm64
restart: on-failure
command: worker
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
erpnext-worker-short:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:${ERPNEXT_VERSION}
platform: linux/arm64
restart: on-failure
command: worker
environment:
- WORKER_TYPE=short
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
erpnext-worker-long:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:${ERPNEXT_VERSION}
platform: linux/arm64
restart: on-failure
command: worker
environment:
- WORKER_TYPE=long
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
erpnext-schedule:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:${ERPNEXT_VERSION}
platform: linux/arm64
restart: on-failure
command: schedule
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
redis-cache:
image: redis:latest
platform: linux/arm64
restart: on-failure
volumes:
- redis-cache-vol:/data
redis-queue:
image: redis:latest
platform: linux/arm64
restart: on-failure
volumes:
- redis-queue-vol:/data
redis-socketio:
image: redis:latest
platform: linux/arm64
restart: on-failure
volumes:
- redis-socketio-vol:/data
mariadb:
image: mariadb:10.3
platform: linux/arm64
restart: on-failure
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
- mariadb-vol:/var/lib/mysql
site-creator:
image: ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:${ERPNEXT_VERSION}
platform: linux/arm64
restart: 'no'
command: new
environment:
- SITE_NAME=${SITE_NAME}
- DB_ROOT_USER=${DB_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- INSTALL_APPS=${INSTALL_APPS}
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
volumes:
mariadb-vol:
redis-cache-vol:
redis-queue-vol:
redis-socketio-vol:
assets-vol:
sites-vol:
cert-vol:
logs-vol: