hs-video-api/docker-compose.yml
2025-06-07 17:13:27 +08:00

69 lines
1.5 KiB
YAML

version: '3.8'
services:
# 开发环境
# hs-video-api-dev:
# build: .
# container_name: hs-video-api-dev
# ports:
# - "8443:5000"
# env_file:
# - .env.dev
# environment:
# - FLASK_ENV=development
# - APP_ENV=dev
# - SECRET_KEY=${DEV_SECRET_KEY:-dev-secret-key}
# volumes:
# - ./logs:/app/logs
# restart: unless-stopped
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 40s
# 测试环境
hs-video-api-test:
build: .
container_name: hs-video-api-test
ports:
- "8443:5000"
env_file:
- .env.dev-server
environment:
- FLASK_ENV=development
- APP_ENV=dev-server
- SECRET_KEY=${TEST_SECRET_KEY:-test-secret-key}
volumes:
- ./logs:/app/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# 生产环境
hs-video-api-pro:
build: .
container_name: hs-video-api-pro
ports:
- "3300:5000"
env_file:
- .env.pro
environment:
- FLASK_ENV=production
- APP_ENV=pro
- SECRET_KEY=${PROD_SECRET_KEY}
volumes:
- ./logs:/app/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s