-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
94 lines (87 loc) · 2.04 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "5000:5000"
volumes:
- ./backend:/app
- ./settings.yml:/etc/abbey/settings.yml:ro
- ./.env:/etc/abbey/.env
- ./file-storage:/app/app/static
environment:
- PYTHONUNBUFFERED=true
depends_on:
- mysql
- redis
- db_pooler
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
ports:
- "3000:3000"
volumes:
- ./frontend:/frontend-build
- ./settings.yml:/etc/abbey/settings.yml:ro
- ./.env:/etc/abbey/.env:ro
- /frontend-build/node_modules # Any modifications to node_modules should be done from inside the container!
mysql:
image: mysql:8
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=learn
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
celery:
build:
context: .
dockerfile: backend/Dockerfile
command: celery -A app.worker.celery worker --loglevel=INFO
volumes:
- ./backend:/app
- ./settings.yml:/etc/abbey/settings.yml:ro
- ./.env:/etc/abbey/.env
- ./file-storage:/app/app/static
depends_on:
- mysql
- db_pooler
- redis
redis:
image: redis:latest
ports:
- "6379:6379"
db_pooler:
build:
context: .
dockerfile: backend/Dockerfile
command: python3 -m app.db_pooler
volumes:
- ./backend:/app
- ./settings.yml:/etc/abbey/settings.yml:ro
- ./.env:/etc/abbey/.env
depends_on:
- redis
- mysql
emailer:
build:
context: .
dockerfile: backend/Dockerfile
command: python3 -m app.email_process
volumes:
- ./backend:/app
- ./settings.yml:/etc/abbey/settings.yml:ro
- ./.env:/etc/abbey/.env
- ./file-storage:/app/app/static
depends_on:
- redis
- mysql
- db_pooler
profiles:
- email
volumes:
mysql-data: