From 57ea1860617695e0a77d15e8ebf5782686c7a550 Mon Sep 17 00:00:00 2001 From: king Date: Fri, 29 May 2026 03:19:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(compose):=20postgres=5Fdefault=20=EC=99=B8?= =?UTF-8?q?=EB=B6=80=20=EB=84=A4=ED=8A=B8=EC=9B=8C=ED=81=AC=20=EB=AA=85?= =?UTF-8?q?=EC=8B=9C=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dbx-main 이 postgres-db (postgres_default 네트워크 소속) 를 DNS 로 찾을 수 있도록 docker-compose.yml 에 external network 선언. 그렇지 않으면 compose 재기동 시마다 docker network connect 를 수동으로 다시 해줘야 함. --- docker-compose.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 786ccc2..724453d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,10 +10,20 @@ services: env_file: - .env environment: - # 사용자/권한 JSON 저장소 — 볼륨에 영구 보관 + # 사용자/권한 JSON 저장소 + 첨부 업로드 — 볼륨에 영구 보관 DATA_DIR: /data volumes: - dbx-main-data:/data + networks: + - default + - postgres_default # postgres-db 컨테이너와 통신 (DSN host=postgres-db) volumes: dbx-main-data: + +networks: + # main_default — compose 자동 생성, 동일 프로젝트 내부 통신용 + default: + # postgres_default — postgres-db 가 속한 외부 네트워크 (별도 compose 가 만듦) + postgres_default: + external: true