From 75bf9b3b886efd2d9add2e6b493b8a0f83f04e34 Mon Sep 17 00:00:00 2001 From: Yiling-J Date: Sun, 20 Sep 2026 11:46:13 +0800 Subject: [PATCH] fix(docker): stop publishing postgres port in compose files (#420) The bundled PostgreSQL service published port 5432 on the host, which caused docker compose up to fail when that port was already in use. A failed start leaves the container without a network endpoint, so subsequent runs reuse the broken container and the app cannot reach the database (Prisma P1001). The app only needs the database inside the compose network, so the host port mapping is unnecessary. Remove it from all local and temporal compose files. --- CHANGELOG.md | 2 ++ docker-compose/local/docker-compose-aliyun.yaml | 2 -- docker-compose/local/docker-compose.yaml | 2 -- docker-compose/temporal/docker-compose.yaml | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5db8533f..92c1b24d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Fixed +- **docker**: Fix an issue where the bundled PostgreSQL container published port 5432 on the host, causing deployment to fail on machines where that port was already in use; the database is now only reachable by Shumai itself + ### Changed ## [0.4.7] - 2026-09-19 diff --git a/docker-compose/local/docker-compose-aliyun.yaml b/docker-compose/local/docker-compose-aliyun.yaml index 6f7afe0b..239a163b 100644 --- a/docker-compose/local/docker-compose-aliyun.yaml +++ b/docker-compose/local/docker-compose-aliyun.yaml @@ -6,8 +6,6 @@ services: POSTGRES_USER: shumai POSTGRES_PASSWORD: shumai_password POSTGRES_DB: shumai_db - ports: - - '5432:5432' volumes: - postgres_data:/var/lib/postgresql/18/docker healthcheck: diff --git a/docker-compose/local/docker-compose.yaml b/docker-compose/local/docker-compose.yaml index 96f20faa..42213fe5 100644 --- a/docker-compose/local/docker-compose.yaml +++ b/docker-compose/local/docker-compose.yaml @@ -6,8 +6,6 @@ services: POSTGRES_USER: shumai POSTGRES_PASSWORD: shumai_password POSTGRES_DB: shumai_db - ports: - - '5432:5432' volumes: - postgres_data:/var/lib/postgresql/18/docker healthcheck: diff --git a/docker-compose/temporal/docker-compose.yaml b/docker-compose/temporal/docker-compose.yaml index 607b23c8..b8e286fd 100644 --- a/docker-compose/temporal/docker-compose.yaml +++ b/docker-compose/temporal/docker-compose.yaml @@ -7,8 +7,6 @@ services: POSTGRES_USER: shumai POSTGRES_PASSWORD: shumai_password POSTGRES_DB: shumai_db - ports: - - '5432:5432' volumes: - postgres_data:/var/lib/postgresql healthcheck: