Files
wxauto_api/docker-compose.yml
2026-04-07 14:11:45 +08:00

71 lines
1.7 KiB
YAML

# ///
# docker-compose.yml
# 描述:Docker Compose 配置 - ARM64 架构 (Apple Silicon Mac)
# 作者:AI Generated
# 创建日期:2026-04-05
# ///
services:
postgres:
image: postgres:15-alpine
container_name: wxauto-postgres
environment:
POSTGRES_USER: wxauto
POSTGRES_PASSWORD: wxauto_password
POSTGRES_DB: wxauto
volumes:
- ./docker_data/db:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U wxauto"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: wxauto-redis
command: redis-server --appendonly yes
volumes:
- ./docker_data/redis:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
wxauto-center:
build:
context: .
dockerfile: Dockerfile
container_name: wxauto-center
environment:
DATABASE_URL: postgresql://wxauto:wxauto_password@postgres:5432/wxauto
REDIS_URL: redis://redis:6379/0
APP_NAME: WXAuto Center
HOST: 0.0.0.0
PORT: 8080
DEBUG: "true"
SECRET_KEY: wxauto-center-secret-key-change-in-production
WORKERS: "1"
API_PREFIX: /api/v1
EXTERNAL_API_KEY: your-external-api-key
TZ: Asia/Shanghai
PYTHONTZ: Asia/Shanghai
volumes:
- ./docker_data/logs:/app/logs
- ./plugins/custom:/app/plugins/custom
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped