113 lines
3.8 KiB
Plaintext
113 lines
3.8 KiB
Plaintext
# ============================================================
|
|
# Qihu-AIFlow 智能自动化PaaS平台 - Docker Compose 配置
|
|
# ============================================================
|
|
# 部署方式:
|
|
# docker compose up -d
|
|
# 或: docker compose up -d --build (重建镜像)
|
|
#
|
|
# 端口说明:
|
|
# 前端 (Nginx): 宿主机 12888 -> 容器内 8080
|
|
# 后端 (Uvicorn): 宿主机 18080 -> 容器内 18080
|
|
# ============================================================
|
|
|
|
services:
|
|
aiflow:
|
|
build: .
|
|
container_name: qihu-aiflow
|
|
ports:
|
|
- "12888:8080"
|
|
- "18080:18080"
|
|
environment:
|
|
- MYSQL_HOST=mysql
|
|
- MYSQL_PORT=3306
|
|
- MYSQL_USER=root
|
|
- MYSQL_PASSWORD=pwd2026
|
|
- MYSQL_DATABASE=aiflow
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- REDIS_PASSWORD=pwd2026
|
|
- SECRET_KEY=aiflow-secret-key-change-in-production-2026
|
|
- APP_ACCESS_URL=http://210.16.161.218:12888
|
|
- DEBUG=false
|
|
- SILICONFLOW_API_KEY=sk-idsplzeccvmbtyqxcrbhaiwmkzwajmicliunkjkouivepaaz
|
|
- SILICONFLOW_BASE_URL=https://api.siliconflow.cn
|
|
- DEFAULT_MODEL=deepseek-ai/DeepSeek-V4-Flash
|
|
- SILICONFLOW_API_KEY=sk-idsplzeccvmbtyqxcrbhaiwmkzwajmicliunkjkouivepaaz
|
|
- SILICONFLOW_BASE_URL=https://api.siliconflow.cn
|
|
- DEFAULT_MODEL=deepseek-ai/DeepSeek-V4-Flash
|
|
- SILICONFLOW_API_KEY=sk-idsplzeccvmbtyqxcrbhaiwmkzwajmicliunkjkouivepaaz
|
|
- SILICONFLOW_BASE_URL=https://api.siliconflow.cn
|
|
- DEFAULT_MODEL=deepseek-ai/DeepSeek-V4-Flash
|
|
- SILICONFLOW_API_KEY=sk-idsplzeccvmbtyqxcrbhaiwmkzwajmicliunkjkouivepaaz
|
|
- SILICONFLOW_BASE_URL=https://api.siliconflow.cn
|
|
- DEFAULT_MODEL=deepseek-ai/DeepSeek-V4-Flash
|
|
- HTTP_PROXY=http://172.18.0.1:7890
|
|
- HTTPS_PROXY=http://172.18.0.1:7890
|
|
- NO_PROXY=localhost,127.0.0.1,::1,210.16.161.218,172.17.0.0/16,172.18.0.0/16,172.19.0.0/16,172.20.0.0/16,10.0.0.0/8,192.168.0.0/16,.svc,.local,casdoor,qihu-aiflow-mysql,qihu-aiflow-redis,qihu-aiflow-pgvector,qihu-aiflow-casdoor,qihuyun.com,ai.qihuyun.com,docs.qihuyun.com,bot.qihuyun.com,siliconflow.cn,api.siliconflow.cn,deepseek.com,api.deepseek.com,volcengineapi.com,aliyun.com,aliyuncs.com,dysmsapi.aliyuncs.com,tencentcloudapi.com,baidubce.com,dashscope.com,qwen.ai,zhipuai.cn,moonshot.cn,minimax.chat,baichuan.com,chatglm.cn,xiaomimimo.com,token-plan-cn.xiaomimimo.com,mi.com,pypi.tuna.tsinghua.edu.cn,feishu.cn,open.feishu.cn,dingtalk.com,open.dingtalk.com,weixin.qq.com,developers.weixin.qq.com,qyapi.weixin.qq.com,ilinkai.weixin.qq.com,tencent.com
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
networks:
|
|
- aiflow-network
|
|
volumes:
|
|
- ./data:/app/data
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "10"
|
|
|
|
mysql:
|
|
image: mysql:8.0
|
|
container_name: qihu-aiflow-mysql
|
|
command: --ssl=0
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=pwd2026
|
|
- MYSQL_DATABASE=aiflow
|
|
ports:
|
|
- "3306:3306"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
restart: unless-stopped
|
|
networks:
|
|
- aiflow-network
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-ppwd2026"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "5"
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: qihu-aiflow-redis
|
|
command: redis-server --requirepass pwd2026 --appendonly yes
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
restart: unless-stopped
|
|
networks:
|
|
- aiflow-network
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "20m"
|
|
max-file: "5"
|
|
|
|
volumes:
|
|
mysql_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
aiflow-network:
|
|
driver: bridge
|