Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (117 loc) · 3.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
125 lines (117 loc) · 3.07 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
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
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
kafka:
image: confluentinc/cp-kafka:latest
ports:
- "29092:29092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: "broker,controller"
KAFKA_CONTROLLER_QUORUM_VOTERS: "1@kafka:29093"
KAFKA_LISTENERS: "PLAINTEXT://kafka:9092,CONTROLLER://kafka:29093,PLAINTEXT_HOST://0.0.0.0:29092"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
KAFKA_INTER_BROKER_LISTENER_NAME: "PLAINTEXT"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
CLUSTER_ID: "Kn7DNxEzRGGT1ScZoyKMbw"
KAFKA_LOG_DIRS: "/tmp/kraft-combined-logs"
restart: unless-stopped
kafka-ui:
image: provectuslabs/kafka-ui:latest
ports:
- "8085:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAP_SERVERS: "kafka:9092"
depends_on:
- kafka
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: