DB 서비스 이름을 postgres에서 db로 변경
Deploy / deploy (push) Successful in 20s

- depends_on, DB_HOST 기본값도 db로 갱신
- deploy: 서비스 이름 변경으로 남는 orphan 컨테이너 정리를 위해 --remove-orphans 추가

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 18:15:38 +09:00
parent f3e97d6c44
commit 67f5d815c9
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
# PostgreSQL
DB_PORT=5432
DB_HOST=postgres
DB_HOST=db
DB_USER=
DB_PASSWORD=
DB_NAME=report_db
+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
- name: Restart containers
run: |
cd "$DEPLOY_DIR"
docker compose up -d
docker compose up -d --remove-orphans
# backend/frontend는 항상 새로 기동: DB 교체 시 스키마 재동기화,
# nginx의 낡은 upstream IP 캐시 방지
docker compose up -d --no-deps --force-recreate backend frontend
+5 -5
View File
@@ -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