Files
InfoGenie/InfoGenie-backend/docker-compose.yml

40 lines
1023 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
infogenie-backend:
build:
context: .
dockerfile: Dockerfile
container_name: infogenie-backend
restart: always
ports:
- "2323:2323"
volumes:
# 持久化数据映射
- /shumengya/docker/infogenie-backend/data:/app/data
environment:
# 从 .env 文件读取环境变量
- MONGO_URI=${MONGO_URI}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- SECRET_KEY=${SECRET_KEY}
- FLASK_ENV=production
# 生产环境配置
- HWT_DOMAIN=.shumengya.top
- HWT_SECURE=False # 如果使用 HTTPS 反向代理,设为 False直接 HTTPS 设为 True
env_file:
- .env
networks:
- infogenie-network
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:2323/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
infogenie-network:
driver: bridge