Fix port mapping: app listens on 5001, map 5000->5001

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-06 01:17:21 +08:00
parent d23aaa3143
commit 3c1715603d
2 changed files with 4 additions and 4 deletions

View File

@@ -28,11 +28,11 @@ RUN touch config.txt
RUN chmod +x mail_api.py RUN chmod +x mail_api.py
# 暴露端口 # 暴露端口
EXPOSE 5000 EXPOSE 5001
# 设置健康检查 # 设置健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5000/ || exit 1 CMD curl -f http://localhost:5001/ || exit 1
# 启动命令 # 启动命令
CMD ["python", "mail_api.py", "web"] CMD ["python", "mail_api.py", "web"]

View File

@@ -5,7 +5,7 @@ services:
build: . build: .
container_name: outlook-mail-automation container_name: outlook-mail-automation
ports: ports:
- "5000:5000" - "5000:5001"
volumes: volumes:
# 挂载配置文件,便于修改邮箱配置 # 挂载配置文件,便于修改邮箱配置
- ./config.txt:/app/config.txt - ./config.txt:/app/config.txt
@@ -20,7 +20,7 @@ services:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/"] test: ["CMD", "curl", "-f", "http://localhost:5001/"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3