修复开发容器启动并加固部署配置

This commit is contained in:
Cheng Zhou
2026-06-22 15:35:00 +08:00
parent 360a2ba2b1
commit 6056c8364a
8 changed files with 88 additions and 8 deletions
-4
View File
@@ -11,8 +11,6 @@ services:
volumes:
# 持久化数据到 Linux 本地,防止重启丢失
- ./pg_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ctms_user -d ctms_db"]
interval: 5s
@@ -28,8 +26,6 @@ services:
pull: false
container_name: ctms_backend
restart: always
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql+asyncpg://ctms_user:secret_password@db/ctms_db
ENV: ${ENV:-development}