DB 볼륨을 /data/postgres 바인드 마운트로 변경
Deploy / deploy (push) Successful in 35s

- named volume 대신 호스트 경로 바인드 마운트 사용 (DB_DATA_DIR, 기본 /data/postgres)
- backend: DB 연결/동기화 실패 시 프로세스 종료 - restart: always가 DB 준비까지 재시도하도록 fail-fast 적용

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 17:56:44 +09:00
parent 8770b1b47b
commit 126c0169aa
3 changed files with 8 additions and 6 deletions
+2
View File
@@ -10,6 +10,8 @@ DB_HOST=postgres
DB_USER=
DB_PASSWORD=
DB_NAME=report_db
# DB 데이터 저장 경로 (호스트 바인드 마운트, 기본값 /data/postgres)
DB_DATA_DIR=/data/postgres
# Admin Account
ADMIN_USER=
+4 -1
View File
@@ -248,7 +248,10 @@ sequelize
);
}
})
.catch((err) => console.log("PostgreSQL Connection/Sync Error:", err));
.catch((err) => {
console.error("PostgreSQL Connection/Sync Error:", err);
process.exit(1);
});
// Auth Middleware
const authenticateToken = (req, res, next) => {
+1 -4
View File
@@ -10,7 +10,7 @@ services:
expose:
- "5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ${DB_DATA_DIR:-/data/postgres}:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
@@ -64,6 +64,3 @@ networks:
# npm(Nginx Proxy Manager)이 컨테이너 이름으로 라우팅하는 공용 네트워크
proxy:
external: true
volumes:
postgres-data: