-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (71 loc) · 1.84 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
version: "3"
services:
voicepocket_apiserver:
build:
context: ./api_server
args:
DJANGO_ALLOWED_HOSTS: "*"
DJANGO_SECRET_KEY: "*"
command: sh -c "/wait && python ./api_server/manage.py makemigrations && python ./api_server/manage.py migrate && python ./api_server/manage.py runserver 0.0.0.0:8000"
container_name: voicepocket_apiserver
restart: on-failure
ports:
- 8000:8000
volumes:
- ./:/voice_pocket
networks:
- voicePocket
depends_on:
- voicepocket_mysql
voicepocket_mysql:
image: mysql
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
container_name: voicepocket_mysql
ports:
- "3306:3306"
volumes:
- ./config/my.cnf:/etc/mysql/conf.d/my.cnf
environment: #
- MYSQL_ROOT_PASSWORD=1234
- MYSQL_DATABASE=voice_pocket
- MYSQL_USER=voice_docker
- MYSQL_PASSWORD=voice!
- TZ=Asia/Seoul
networks:
- voicePocket
rabbit:
hostname: voice_pocket_host #
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
environment: #
- RABBITMQ_DEFAULT_USER=pocket
- RABBITMQ_DEFAULT_PASS=pocket!
- RABBITMQ_DEFAULT_VHOST=voice_pocket_host
ports:
- 5672:5672
- 15672:15672
volumes:
- ./:/var/lib/rabbitmq
networks:
- voicePocket
depends_on:
- voicepocket_apiserver
celery:
build:
context: ./api_server
restart: unless-stopped
depends_on:
- "voicepocket_apiserver"
- "voicepocket_mysql"
- "rabbit"
networks:
- voicePocket
command: ["celery", "-A", "api_server.worker.celery_app", "worker", "--loglevel=info"]
volumes:
- ./:/voice_pocket
networks:
voicePocket:
driver: bridge