84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# API Service - FastAPI backend
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: pixelle-video-api
|
|
command: uv run python api/app.py --host 0.0.0.0 --port 8000
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
# Mount config file (required)
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
# Mount data directories for persistence
|
|
# data/ contains: users/, bgm/, templates/, workflows/ (custom resources)
|
|
- ./data:/app/data
|
|
- ./output:/app/output
|
|
# Note: Default resources (bgm/, templates/, workflows/) are baked into the image
|
|
# Custom resources in data/* will override defaults
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
networks:
|
|
- pixelle-network
|
|
|
|
# Web UI Service - Streamlit frontend
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: pixelle-video-web
|
|
command: uv run streamlit run web/app.py --server.port 8501 --server.address 0.0.0.0
|
|
ports:
|
|
- "8501:8501"
|
|
volumes:
|
|
# Mount config file (required)
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
# Mount data directories for persistence
|
|
# data/ contains: users/, bgm/, templates/, workflows/ (custom resources)
|
|
- ./data:/app/data
|
|
- ./output:/app/output
|
|
# Note: Default resources (bgm/, templates/, workflows/) are baked into the image
|
|
# Custom resources in data/* will override defaults
|
|
environment:
|
|
- TZ=Asia/Shanghai
|
|
- STREAMLIT_SERVER_PORT=8501
|
|
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
|
restart: unless-stopped
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 15s
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
networks:
|
|
- pixelle-network
|
|
|
|
networks:
|
|
pixelle-network:
|
|
driver: bridge
|
|
|