-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (67 loc) · 1.74 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
version: "3"
services:
voicepocket_apiserver:
container_name: voicepocket_apiserver
build:
context: ./voicepocket
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://voicepocket_mysql:3306/voice_pocket
SPRING_DATASOURCE_USERNAME: voice_docker
SPRING_DATASOURCE_PASSWORD: voice!
restart: on-failure
ports:
- 8080:8080
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:
- ./celery_consumer/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:
container_name: voicepocket_rabbitmq
hostname: rabbit_example
image: rabbitmq:3-management
command: rabbitmq-server
restart: unless-stopped
environment:
- RABBITMQ_DEFAULT_USER=sample
- RABBITMQ_DEFAULT_PASS=sample!
- RABBITMQ_DEFAULT_VHOST=rabbit_example
ports:
- 5672:5672
networks:
- voicePocket
depends_on:
- voicepocket_apiserver
celery:
container_name: voicepocket_celery
build:
context: ./celery_consumer
restart: unless-stopped
depends_on:
- "voicepocket_apiserver"
- "rabbit"
networks:
- voicePocket
command: ["celery", "-A", "celery_consume", "worker", "--loglevel=info"]
volumes:
- ./celery_consumer:/voice_pocket
networks:
voicePocket:
driver: bridge