forked from boostcampwm-2024/web15-OctoDocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.local.yml
139 lines (128 loc) · 2.74 KB
/
compose.local.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
version: "3.8"
services:
postgres:
build:
context: .
dockerfile: ./services/postgres/Dockerfile
image: postgres-pgvector-mecab
env_file:
- .env.local
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
redis:
image: redis:latest
env_file:
- .env.local
networks:
- net
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
retries: 3
start_period: 10s
timeout: 5s
frontend:
build:
context: .
dockerfile: ./services/frontend/Dockerfile.local
image: frontend:latest
env_file:
- .env.local
volumes:
- ./apps/frontend:/app/apps/frontend
networks:
- net
ports:
- "5173:5173" # Vite dev server
backend:
build:
context: .
dockerfile: ./services/backend/Dockerfile.local
image: backend:latest
env_file:
- .env.local
volumes:
- ./apps/backend:/app/apps/backend
- ./libs:/app/libs
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- net
ports:
- "3000:3000" # 백엔드 API 포트
scheduler:
build:
context: .
dockerfile: ./services/scheduler/Dockerfile.local
image: scheduler:latest
env_file:
- .env.local
volumes:
- ./apps/scheduler:/app/apps/scheduler
- ./libs:/app/libs
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- net
ports:
- "3001:3000" # 백엔드 API 포트
websocket:
build:
context: .
dockerfile: ./services/websocket/Dockerfile.local
image: websocket:latest
env_file:
- .env.local
volumes:
- ./apps/websocket:/app/apps/websocket
- ./libs:/app/libs
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- net
ports:
- "4242:4242" # WebSocket 포트
nginx:
build:
context: .
dockerfile: ./services/nginx/Dockerfile.local
ports:
- "80:80"
- "443:443"
depends_on:
- backend
- websocket
networks:
- net
volumes:
- type: bind
source: ./services/nginx/ssl
target: /etc/nginx/ssl
bind:
create_host_path: true
propagation: rprivate
- ./services/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
networks:
net:
volumes:
postgres_data: