签入版本
This commit is contained in:
+3
-3
@@ -153,13 +153,13 @@ USER flask_user
|
||||
# 定义健康检查命令(需应用提供 /health 端点)
|
||||
# 生产环境建议使用 curl 或 wget 检查
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=10s \
|
||||
CMD curl -f http://localhost:8023/health || exit 1
|
||||
CMD curl -f http://localhost:8021/health || exit 1
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# 容器暴露端口声明
|
||||
# ----------------------------------------------------------------------------
|
||||
# 声明应用监听端口(仅用于文档说明,实际映射在 docker-compose 中配置)
|
||||
EXPOSE 8023
|
||||
EXPOSE 8021
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# 容器启动命令
|
||||
@@ -184,7 +184,7 @@ CMD ["gunicorn", "-c", "gunicorn.conf.py", "src.wsgi:app"]
|
||||
# docker history flask_elevue:latest
|
||||
#
|
||||
# 5. 运行容器测试:
|
||||
# docker run -d -p 8023:8023 flask_elevue:latest
|
||||
# docker run -d -p 8021:8021 flask_elevue:latest
|
||||
#
|
||||
# 6. 进入容器调试:
|
||||
# docker run -it --entrypoint /bin/bash flask_elevue:latest
|
||||
|
||||
@@ -61,7 +61,7 @@ services:
|
||||
# 格式:宿主机端口:容器端口
|
||||
# 注意:host 模式下此配置无效,保留是为了模式切换时生效
|
||||
ports:
|
||||
- 8023:8023
|
||||
- 8021:8021
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
# 存储配置(数据持久化)
|
||||
|
||||
Reference in New Issue
Block a user