forked from tukcom2023CD/BoSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
73 lines (67 loc) · 1.41 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
version: "3"
services:
db:
image: mysql:5.7
platform: linux/amd64 # 로컬 환경에서만
environment:
MYSQL_DATABASE: Boss
MYSQL_USER: boss
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
ports:
- "3307:3306"
networks:
- network
volumes:
- ./Backend/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./Backend/my.cnf:/etc/mysql/my.cnf
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p password"]
timeout: 5s
retries: 10
web: &web
build:
context: ./Backend
dockerfile: Dockerfile
ports:
- "5001:5001"
depends_on:
- db
- celery
networks:
- network
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/"]
interval: 5s
timeout: 3s
retries: 3
# ai:
# build:
# context: ./AI
# dockerfile: Dockerfile
# ports:
# - "5002:5002"
# depends_on:
# - db
# networks:
# - network
# restart: on-failure
rabbitmq:
image: rabbitmq
ports:
- "5672:5672"
environment:
- RABBITMQ_DEFAULT_USER=user
- RABBITMQ_DEFAULT_PASS=password
networks:
- network
celery:
<<: *web
command: celery -A celery_test.celery worker --loglevel=INFO
depends_on:
- rabbitmq
ports: []
networks:
network:
driver: bridge