- 모든 서비스 ports -> expose로 변경 (외부 포트 노출 없음) - frontend/backend를 공용 proxy 네트워크에 연결 - npm이 컨테이너 이름(report-frontend:80)으로 라우팅 - DB는 내부 app-network 전용 유지 - 미사용이 된 BACKEND_PORT/FRONTEND_PORT 변수 제거 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,3 @@ REFRESH_SECRET=
|
|||||||
|
|
||||||
# Gemini API Key
|
# Gemini API Key
|
||||||
JEMINI_KEY=
|
JEMINI_KEY=
|
||||||
|
|
||||||
# Ports
|
|
||||||
BACKEND_PORT=54530
|
|
||||||
FRONTEND_PORT=55110
|
|
||||||
|
|||||||
+11
-6
@@ -7,8 +7,8 @@ services:
|
|||||||
POSTGRES_DB: ${DB_NAME:-report_db}
|
POSTGRES_DB: ${DB_NAME:-report_db}
|
||||||
POSTGRES_USER: ${DB_USER:-postgres}
|
POSTGRES_USER: ${DB_USER:-postgres}
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD가 .env에 설정되어야 합니다}
|
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD가 .env에 설정되어야 합니다}
|
||||||
ports:
|
expose:
|
||||||
- "5442:5432"
|
- "5432"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres-data:/var/lib/postgresql/data
|
- postgres-data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
@@ -24,8 +24,8 @@ services:
|
|||||||
build: ./backend
|
build: ./backend
|
||||||
container_name: report-backend
|
container_name: report-backend
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
expose:
|
||||||
- "${BACKEND_PORT:-54530}:3000"
|
- "3000"
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=${DB_HOST:-postgres}
|
- DB_HOST=${DB_HOST:-postgres}
|
||||||
- DB_PORT=${DB_PORT:-5432}
|
- DB_PORT=${DB_PORT:-5432}
|
||||||
@@ -44,21 +44,26 @@ services:
|
|||||||
- ./backend/img:/app/img
|
- ./backend/img:/app/img
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
- proxy
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build: ./frontend
|
build: ./frontend
|
||||||
container_name: report-frontend
|
container_name: report-frontend
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
expose:
|
||||||
- "${FRONTEND_PORT:-55110}:80"
|
- "80"
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
- proxy
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
# npm(Nginx Proxy Manager)이 컨테이너 이름으로 라우팅하는 공용 네트워크
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres-data:
|
postgres-data:
|
||||||
Reference in New Issue
Block a user