-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
115 lines (111 loc) · 2.4 KB
/
docker-compose.yaml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "3"
services:
## TODO 기본 틀만 잡았으며 추후에 수정 예정
# ai:
# container_name: ai
# build:
# context: ./ai
# dockerfile: Dockerfile
# ports:
# - "8001:8001"
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- 3000:3000
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/dist
- ./frontend/node_modules/:/frontend/node_modules
tty: true
networks:
- mynet
mysql:
container_name: deepBlue_mysql
# image: mysql:8.0-oracle
build:
context: ./db
dockerfile: Dockerfile
volumes:
- mysql_data_dev:/mysql
# env_file:
# - ./.env
networks:
- mynet
ports:
- 3306:3306
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
backend:
container_name: backend
build: ./backend
entrypoint: /bin/bash
command: -c "alembic upgrade head && uvicorn main:app --host 0.0.0.0 --reload"
ports:
- 8000:8000
networks:
- mynet
# 작업이 끝나도 종료되지 않게 하는 명령
tty: true
depends_on:
mysql:
condition: service_healthy
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: "rabbitmq"
ports:
- 5672:5672
- 15672:15672
volumes:
- ~/.docker-conf/rabbitmq/data/:/var/lib/rabbitmq/
- ~/.docker-conf/rabbitmq/log/:/var/log/rabbitmq
networks:
- mynet
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
networks:
- mynet
grafana:
image: grafana/grafana
ports:
- 3001:3000
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
platform: linux/amd64
container_name: cadvisor
ports:
- 8081:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
networks:
- mynet
nginx:
container_name: nginx
build:
context: ./nginx
ports:
- 80:80
- 443:443
volumes:
- build_folder:/var/www/frontend
networks:
- mynet
volumes:
mysql_data_dev: null
build_folder: null
networks:
mynet:
driver: bridge