-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.data.yml
More file actions
78 lines (74 loc) · 2.3 KB
/
Copy pathdocker-compose.data.yml
File metadata and controls
78 lines (74 loc) · 2.3 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
# 데이터 저장소와 메시지 브로커 묶음
services:
# 관계형 데이터 저장소
postgres:
image: postgres:16
container_name: hublink-postgres
restart: unless-stopped
env_file:
- ${HUBLINK_ENV_FILE:-.env.gcp}
environment:
POSTGRES_DB: hublink
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d hublink"]
interval: 10s
timeout: 5s
retries: 5
# Redis Stream과 캐시 저장소
redis:
image: redis:7.2
container_name: hublink-redis
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Kafka 단일 브로커
kafka:
image: confluentinc/cp-kafka:7.6.0
container_name: hublink-kafka
restart: unless-stopped
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:29093
KAFKA_LISTENERS: INSIDE://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:29092,OUTSIDE://${DATA_VM_IP}:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qk
# data VM host 리소스 메트릭 수집기
node-exporter:
image: prom/node-exporter:v1.8.2
container_name: hublink-node-exporter-data
restart: unless-stopped
ports:
- "9100:9100"
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($|/)'
volumes:
- /:/host:ro,rslave
- /proc:/host/proc:ro
- /sys:/host/sys:ro
# 컨테이너 데이터 유지 볼륨
volumes:
postgres-data: