From 8770b1b47b9fd9316572185528879e354569f42f Mon Sep 17 00:00:00 2001 From: TtiPo Date: Sun, 19 Jul 2026 17:43:52 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=B8=EC=8A=A4=ED=8A=B8=20=ED=8F=AC?= =?UTF-8?q?=ED=8A=B8=20=EB=A7=A4=ED=95=91=20=EC=A0=9C=EA=B1=B0,=20npm=20?= =?UTF-8?q?=ED=94=84=EB=A1=9D=EC=8B=9C=20=EA=B2=BD=EC=9C=A0=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=EB=A1=9C=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 모든 서비스 ports -> expose로 변경 (외부 포트 노출 없음) - frontend/backend를 공용 proxy 네트워크에 연결 - npm이 컨테이너 이름(report-frontend:80)으로 라우팅 - DB는 내부 app-network 전용 유지 - 미사용이 된 BACKEND_PORT/FRONTEND_PORT 변수 제거 Co-Authored-By: Claude Fable 5 --- .env.example | 4 ---- docker-compose.yml | 17 +++++++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index 502dbdde..3a82bc85 100644 --- a/.env.example +++ b/.env.example @@ -21,7 +21,3 @@ REFRESH_SECRET= # Gemini API Key JEMINI_KEY= - -# Ports -BACKEND_PORT=54530 -FRONTEND_PORT=55110 diff --git a/docker-compose.yml b/docker-compose.yml index 9438fca6..4acda645 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,8 @@ services: POSTGRES_DB: ${DB_NAME:-report_db} POSTGRES_USER: ${DB_USER:-postgres} POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD가 .env에 설정되어야 합니다} - ports: - - "5442:5432" + expose: + - "5432" volumes: - postgres-data:/var/lib/postgresql/data networks: @@ -24,8 +24,8 @@ services: build: ./backend container_name: report-backend restart: always - ports: - - "${BACKEND_PORT:-54530}:3000" + expose: + - "3000" environment: - DB_HOST=${DB_HOST:-postgres} - DB_PORT=${DB_PORT:-5432} @@ -44,21 +44,26 @@ services: - ./backend/img:/app/img networks: - app-network + - proxy frontend: build: ./frontend container_name: report-frontend restart: always - ports: - - "${FRONTEND_PORT:-55110}:80" + expose: + - "80" depends_on: - backend networks: - app-network + - proxy networks: app-network: driver: bridge + # npm(Nginx Proxy Manager)이 컨테이너 이름으로 라우팅하는 공용 네트워크 + proxy: + external: true volumes: postgres-data: \ No newline at end of file