chore: 调整健康检查端口和SQL注释验证内容

1. 更新docker-compose健康检查使用环境变量PORT
2. 优化SQL迁移脚本的注释和验证查询语句
This commit is contained in:
2026-05-28 20:57:35 +08:00
parent 49b4046fd4
commit 3d91b4c6af
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ services:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-8000}/docs"]
interval: 30s
timeout: 10s
start_period: 10s
+4 -4
View File
@@ -185,8 +185,8 @@ VALUES (
);
-- =====================================================
-- 完成提示
-- 完成提示与验证
-- =====================================================
-- 执行完成后,可通过以下命令验证:
-- SELECT name FROM sqlite_master WHERE type='table';
-- SELECT * FROM schema_version ORDER BY applied_at DESC;
-- 验证建表结果(执行此查询以确认所有表已创建)
SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;
SELECT 'Schema version applied: ' || version AS result FROM schema_version ORDER BY applied_at DESC LIMIT 1;