Skip to content

Commit de8e101

Browse files
Tolerblancsummersummerwhyezcolin2
committed
chore: websocket app 분리 관련 인프라 설정 수정
Co-authored-by: Summer Min <[email protected]> Co-authored-by: ez <[email protected]>
1 parent 7602880 commit de8e101

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

services/backend/Dockerfile.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN yarn install
1313

1414
# 소스 코드는 볼륨으로 마운트할 예정이므로 COPY 불필요
1515

16-
EXPOSE 3000 1234
16+
EXPOSE 3000
1717

1818
# 개발 모드로 실행
1919
CMD ["yarn", "dev"]

services/nginx/conf.d/default.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,18 @@ server {
4747
proxy_cache_bypass $http_upgrade;
4848
}
4949

50-
# WebSocket
50+
# WebSocket for YJS
5151
location /socket.io {
52-
proxy_pass http://backend:1234;
52+
proxy_pass http://websocket:4242;
5353
proxy_http_version 1.1;
5454
proxy_set_header Upgrade $http_upgrade;
5555
proxy_set_header Connection "Upgrade";
5656
proxy_set_header Host $host;
57+
58+
# WebSocket 연결 안정성을 위한 추가 설정
59+
proxy_read_timeout 3600s;
60+
proxy_send_timeout 3600s;
61+
proxy_buffering off;
5762
}
5863

5964
# Vite static assets
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:20-alpine
2+
3+
WORKDIR /app
4+
5+
# Install dependencies
6+
COPY package.json yarn.lock ./
7+
RUN yarn install
8+
9+
# Copy source
10+
COPY . .
11+
12+
# Install app dependencies
13+
WORKDIR /app/apps/websocket
14+
RUN yarn install
15+
16+
EXPOSE 4242
17+
18+
# Start the application
19+
CMD ["yarn", "dev"]

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4524,7 +4524,7 @@ autoprefixer@^10.4.20:
45244524
picocolors "^1.0.1"
45254525
postcss-value-parser "^4.2.0"
45264526

4527-
axios@^1.7.7:
4527+
axios@^1.7.7, axios@^1.7.8:
45284528
version "1.7.8"
45294529
resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.8.tgz#1997b1496b394c21953e68c14aaa51b7b5de3d6e"
45304530
integrity sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==

0 commit comments

Comments
 (0)