-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (90 loc) · 2.02 KB
/
docker-compose.yml
File metadata and controls
98 lines (90 loc) · 2.02 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
86
87
88
89
90
91
92
93
94
95
96
97
98
version: "3.9"
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: web02_users
POSTGRES_PASSWORD: 123999
POSTGRES_DB: web02
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
backend:
build:
context: .
dockerfile: backend/Dockerfile
env_file:
- ./backend/.env
environment:
PORT: 3000
FRONTEND_URL: http://localhost
DATABASE_URL: postgresql://web02_users:123999@postgres:5432/web02?schema=public
REDIS_HOST: redis
REDIS_PORT: 6379
command: >
sh -lc "cd backend &&
pnpm prisma migrate deploy &&
pnpm start:prod"
ports:
- "3000:3000"
depends_on:
- postgres
- redis
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"
depends_on:
- backend
- cadvisor
restart: unless-stopped
grafana:
image: grafana/grafana:latest
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
ports:
- "3001:3000"
depends_on:
- prometheus
restart: unless-stopped
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
ports:
- "8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
privileged: true
restart: unless-stopped
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
args:
# 배포 시 백엔드 도메인/포트로 교체
VITE_API_URL: /
ports:
- "80:80"
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data:
redis_data: