- depends_on, DB_HOST 기본값도 db로 갱신 - deploy: 서비스 이름 변경으로 남는 orphan 컨테이너 정리를 위해 --remove-orphans 추가 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -1,5 +1,5 @@
|
||||
services:
|
||||
postgres:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: report-db
|
||||
restart: always
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
networks:
|
||||
- app-network
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-report_db}"]
|
||||
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-report_db}" ]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
expose:
|
||||
- "3000"
|
||||
environment:
|
||||
- DB_HOST=${DB_HOST:-postgres}
|
||||
- DB_HOST=${DB_HOST:-db}
|
||||
- DB_PORT=${DB_PORT:-5432}
|
||||
- DB_USER=${DB_USER:-postgres}
|
||||
- DB_PASSWORD=${DB_PASSWORD:?DB_PASSWORD가 .env에 설정되어야 합니다}
|
||||
@@ -38,7 +38,7 @@ services:
|
||||
- ADMIN_PASS=${ADMIN_PASS:?ADMIN_PASS가 .env에 설정되어야 합니다}
|
||||
- JEMINI_KEY=${JEMINI_KEY}
|
||||
depends_on:
|
||||
postgres:
|
||||
db:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./backend/img:/app/img
|
||||
@@ -63,4 +63,4 @@ networks:
|
||||
driver: bridge
|
||||
# npm(Nginx Proxy Manager)이 컨테이너 이름으로 라우팅하는 공용 네트워크
|
||||
proxy:
|
||||
external: true
|
||||
external: true
|
||||
|
||||
Reference in New Issue
Block a user