-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
94 lines (85 loc) · 1.85 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
version: "3"
services:
mysql:
container_name: mysql
image: mysql:latest
restart: always
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
# MYSQL_USER: ${DB_USERNAME}
# MYSQL_PASSWORD: ${DB_USER_PASSWORD}
TZ: Asia/Seoul
redis:
container_name: redis
image: redis
ports:
- "6379:6379"
springboot:
container_name: springboot
build:
context: ./backend
restart: always
ports:
- "8080:8080"
depends_on:
- mysql
environment:
WAIT_HOSTS: mysql:3306
volumes:
- ./spring-boot/log:/logs #log 연결
nginx:
container_name: nginx
build:
dockerfile: dockerfile
context: ./nginx
ports:
- "80:80"
restart: always
depends_on:
- springboot
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
ports:
- "3000:3000"
prometheus:
container_name: prometheus
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./prometheus:/etc/prometheus
- ./prometheus/data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
links:
- alertmanager:alertmanager
depends_on:
- springboot
grafana:
container_name: grafana
image: grafana/grafana
ports:
- 3001:3000
volumes:
- ./grafana:/var/lib/grafana
- ./datasource.yml:/etc/grafana/provisioning/datasource.yml
depends_on:
- prometheus
- springboot
alertmanager:
image: prom/alertmanager
container_name: alert-manager
ports:
- 9093:9093
volumes:
- ./alertmanager/:/etc/alertmanager/
restart: always
command:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"