fix: 컨테이너 분리 후 프록시 설정 수정

- vite.config.js: localhost:3000 → fromis9-backend:80
- docker-compose.yml: depends_on, VITE_API_URL 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
caadiq 2026-01-19 09:54:07 +09:00
parent 8a8af275a9
commit 7e9e51666a
2 changed files with 4 additions and 14 deletions

View file

@ -5,7 +5,7 @@ services:
labels: labels:
- "com.centurylinklabs.watchtower.enable=false" - "com.centurylinklabs.watchtower.enable=false"
environment: environment:
- VITE_API_URL=http://backend:3000 - VITE_API_URL=http://fromis9-backend:80
# 개발 모드 # 개발 모드
volumes: volumes:
- ./frontend:/app - ./frontend:/app
@ -13,7 +13,7 @@ services:
# 배포 모드 (사용 시 위 volumes를 주석처리) # 배포 모드 (사용 시 위 volumes를 주석처리)
# volumes: [] # volumes: []
depends_on: depends_on:
- backend - fromis9-backend
networks: networks:
- app - app
restart: unless-stopped restart: unless-stopped

View file

@ -8,24 +8,14 @@ export default defineConfig({
port: 80, port: 80,
allowedHosts: true, allowedHosts: true,
proxy: { proxy: {
// 개발 모드 (localhost:3000)
"/api": { "/api": {
target: "http://localhost:3000", target: "http://fromis9-backend:80",
changeOrigin: true, changeOrigin: true,
}, },
"/docs": { "/docs": {
target: "http://localhost:3000", target: "http://fromis9-backend:80",
changeOrigin: true, changeOrigin: true,
}, },
// 배포 모드 (사용 시 위를 주석처리)
// "/api": {
// target: "http://fromis9-backend:3000",
// changeOrigin: true,
// },
// "/docs": {
// target: "http://fromis9-backend:3000",
// changeOrigin: true,
// },
}, },
}, },
}); });