chore(docker): expose postgres port to host
Map container port 5432 to host port 50001 for external database access
This commit is contained in:
@@ -7,6 +7,8 @@ services:
|
|||||||
POSTGRES_PASSWORD: pokopia
|
POSTGRES_PASSWORD: pokopia
|
||||||
volumes:
|
volumes:
|
||||||
- postgres18_data:/var/lib/postgresql
|
- postgres18_data:/var/lib/postgresql
|
||||||
|
ports:
|
||||||
|
- "50001:5432" # 添加这一行:宿主机 50001 → 容器 5432
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U pokopia -d pokopia"]
|
test: ["CMD-SHELL", "pg_isready -U pokopia -d pokopia"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
|||||||
Reference in New Issue
Block a user