-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
236 lines (224 loc) · 5.21 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
version: "3"
services:
frontend:
build: ./frontend/
container_name: frontend
depends_on:
- backend
# backend:
# condition: service_healthy
env_file:
- ./frontend/frontend/.env
# network 설정에 따라 삭제 가능
expose:
- "3333"
- "81"
- "83"
- "85"
healthcheck:
interval: 5s
test: ["CMD-SHELL", "wget -O - http://localhost:3333 || exit 1"]
timeout: 20s
retries: 20
image: frontend:LastExTranscendence
init: true
networks:
- transcendence
ports:
- 3333:3333
restart: on-failure
volumes:
- ./frontend/frontend:/app
backend:
build: ./backend/
container_name: backend
depends_on:
postgresql:
condition: service_healthy
# env_file:
# - ./backend/.env
# network 설정에 따라 삭제 가능
expose:
- "3001"
- "81"
- "83"
- "85"
# - "6379"
healthcheck:
interval: 5s
test: ["CMD-SHELL", "wget -O - http://localhost:3001 || exit 1"]
timeout: 20s
retries: 20
image: backend:LastExTranscendence
init: true
networks:
- transcendence
ports:
- 3001:3001
- 81:81
- 83:83
- 85:85
restart: on-failure
volumes:
- ./backend:/app
postgresql:
container_name: postgresql
command: postgres -c 'hba_file=/var/lib/postgresql/pg_hba.conf'
env_file:
- ./postgresql.env
environment:
- PGUSER=postgres
# network 설정에 따라 삭제 가능
expose:
- "5432"
healthcheck:
interval: 5s
test:
[
"CMD-SHELL",
"pg_isready",
"-d",
"$${POSTGRES_DB}",
"-U",
"$${POSTGRES_USER}",
]
timeout: 3s
retries: 3
image: postgres:16-alpine3.18
networks:
- transcendence
ports:
- 5432:5432
restart: on-failure
volumes:
- postgresql:/var/lib/postgresql/data
- ./pg_hba.conf:/var/lib/postgresql/pg_hba.conf
pgadmin:
container_name: pgadmin
depends_on:
postgresql:
condition: service_healthy
env_file:
- ./pgadmin.env
# network 설정에 따라 삭제 가능
expose:
- 5050
# healthcheck:
# interval: 5s
# test: ["CMD-SHELL", "wget -O - http://localhost:80/misc/ping || exit 1"]
# timeout: 3s
# retries: 3
image: dpage/pgadmin4:8.0
networks:
- transcendence
ports:
- 5050:80
restart: on-failure
volumes:
- ./pgadmin_servers.json:/pgadmin4/servers.json
redis:
image: redis:7
container_name: redis
networks:
- transcendence
expose:
- 6379
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.2
container_name: cadvisor
restart: unless-stopped
privileged: true
ports:
- "8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
networks:
- transcendence
prometheus:
container_name: prometheus
image: prom/prometheus
user: root
volumes:
- ./prometheus/:/etc/prometheus/
- ./prometheus/data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
# - "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
ports:
- 9090:9090
expose:
- 9090
networks:
- transcendence
restart: always
grafana:
container_name: grafana
image: grafana/grafana
user: root
volumes:
- ./grafana/data:/var/lib/grafana
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- "./grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml"
- "./grafana/dashboard.json:/var/lib/grafana/dashboards/dashboard.json"
- "./grafana/default.yaml:/etc/grafana/provisioning/dashboards/default.yaml"
ports:
- 3000:3000
expose:
- 3000
networks:
- transcendence
restart: always
nginx:
container_name: proxy_server
depends_on:
frontend:
condition: service_healthy
backend:
condition: service_healthy
image: nginx:1.23-alpine
restart: always
extra_hosts:
- host.docker.internal:host-gateway
ports:
- 80:80
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf
networks:
- transcendence
node-exporter:
container_name: node-exporter
image: quay.io/prometheus/node-exporter:latest
command:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--collector.filesystem.ignored-mount-points"
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
ports:
- 9100:9100
expose:
- 9100
networks:
- transcendence
pid: host
restart: unless-stopped
networks:
transcendence:
name: transcendence
driver: bridge
volumes:
postgresql:
name: postgresql
driver: local
driver_opts:
o: "bind"
type: "none"
device: /Users/jusohn/goinfre/data