forked from UMC-8th-kkukmoa/back-end
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (77 loc) · 1.93 KB
/
docker-compose.yml
File metadata and controls
85 lines (77 loc) · 1.93 KB
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
services:
mysql:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
TZ: Asia/Seoul
volumes:
- ./mysql_data:/var/lib/mysql
ports:
- 3306:3306
healthcheck:
test: [ "CMD", "mysqladmin", "ping" ] # MySQL이 healthy 한 지 판단할 수 있는 명령어
interval: 5s # 5초 간격으로 체크
retries: 10 # 10번까지 재시도
redis:
image: redis:latest
ports:
- 6379:6379
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
retries: 10
graduate:
env_file:
- .env
image: ${DOCKER_USERNAME}/graduate:latest # 이미지 이름을 명시적으로 설정
ports:
- 8080:8080
environment:
SPRING_PROFILES_ACTIVE: prod # Spring 프로파일을 prod로 설정
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- /etc/letsencrypt:/etc/letsencrypt:ro # SSL 인증서 공유
depends_on:
- graduate
dozzle:
image: amir20/dozzle:latest
container_name: dozzle
ports:
- "8081:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock # 로그 접근을 위한 도커 소켓 마운트
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
container_name: grafana
ports:
- "3000:3000"
volumes:
- grafana-storage:/var/lib/grafana
node-exporter:
image: prom/node-exporter
container_name: node-exporter
ports:
- "9100:9100"
volumes:
mysql_data:
grafana-storage: