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:
@@ -28,11 +28,11 @@ RUN touch config.txt
|
||||
RUN chmod +x mail_api.py
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 5000
|
||||
EXPOSE 5001
|
||||
|
||||
# 设置健康检查
|
||||
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"]
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
build: .
|
||||
container_name: outlook-mail-automation
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5000:5001"
|
||||
volumes:
|
||||
# 挂载配置文件,便于修改邮箱配置
|
||||
- ./config.txt:/app/config.txt
|
||||
@@ -20,7 +20,7 @@ services:
|
||||
- TZ=Asia/Shanghai
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5001/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in New Issue
Block a user