-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
75 lines (74 loc) · 1.47 KB
/
docker-compose.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
version: '3.4'
x-restart-policy: &restart_policy
restart: unless-stopped
x-dd-defaults: &dd_defaults
<< : *restart_policy
build:
context: ./backend
environment:
- REDIS_URI
- CELERY_BROKER_URL
- C_FORCE_ROOT=true
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_HOST
volumes:
- 'dd-static:/static/'
services:
backend:
<<: *dd_defaults
frontend:
<<: *restart_policy
build:
context: './frontend'
mysql:
<<: *restart_policy
image: 'mysql:8.0.26'
volumes:
- 'dd-mysql-data:/var/lib/mysql'
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
beat:
<<: *dd_defaults
command: run beat
worker:
<<: *dd_defaults
command: run worker
nginx:
<<: *restart_policy
ports:
- '$DD_BIND:80/tcp'
image: 'nginx:1.19.5-alpine'
volumes:
- 'dd-static:/backend/static/'
- 'dd-nginx-log:/var/log/nginx/'
- type: bind
read_only: true
source: ./nginx/nginx.conf
target: /etc/nginx/nginx.conf
depends_on:
- backend
- frontend
logging:
driver: "json-file"
options:
max-size: "100M"
max-file: "10"
redis:
<<: *restart_policy
image: 'redis:6.2-alpine'
volumes:
- 'dd-redis:/data'
ulimits:
nofile:
soft: 10032
hard: 10032
volumes:
dd-static:
dd-nginx-log:
dd-redis:
dd-mysql-data: