mirror of
https://github.com/linyqh/NarratoAI.git
synced 2025-12-10 18:02:51 +00:00
重构Docker相关配置,包括: - 更新.dockerignore文件,增加更多忽略规则 - 优化requirements.txt依赖管理 - 新增Makefile提供常用命令 - 重构docker-compose.yml配置 - 增强docker-entrypoint.sh功能 - 改进Dockerfile多阶段构建 - 新增docker-deploy.sh一键部署脚本
30 lines
610 B
YAML
30 lines
610 B
YAML
services:
|
|
narratoai-webui:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: narratoai:latest
|
|
container_name: narratoai-webui
|
|
|
|
ports:
|
|
- "8501:8501"
|
|
|
|
volumes:
|
|
- ./storage:/NarratoAI/storage
|
|
- ./config.toml:/NarratoAI/config.toml
|
|
- ./resource:/NarratoAI/resource:ro
|
|
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- TZ=Asia/Shanghai
|
|
|
|
restart: unless-stopped
|
|
|
|
# 健康检查
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|