CMVR-IOT/deploy/chengzhi/compose.yaml

52 lines
1.4 KiB
YAML

name: city-vocational-college
services:
backend:
image: city-vocational-backend:${RELEASE_TAG:?set RELEASE_TAG}
build:
context: ./current
dockerfile: Dockerfile.backend
restart: unless-stopped
environment:
TZ: Asia/Shanghai
CMVR_DB_NAME: cmvr-iot-chengzhi
VOXCPM2_URL: http://192.168.28.10:18194
QWEN_GENERALIZATION_BASE_URL: http://192.168.28.10:14081/v1
volumes:
- ./config/xfyun-secrets.properties:/app/config/xfyun-secrets.properties:ro
- ./logs:/app/logs
- ./logs:/home/cmvr-iot/logs
- ./uploads:/app/uploads
mem_limit: 3g
logging:
driver: json-file
options:
max-size: 20m
max-file: '3'
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8080/captchaImage >/dev/null"]
interval: 15s
timeout: 5s
retries: 12
start_period: 90s
frontend:
image: city-vocational-frontend:${FRONTEND_RELEASE_TAG:-${RELEASE_TAG:?set RELEASE_TAG}}
build:
context: ${FRONTEND_CONTEXT:-./current}
dockerfile: Dockerfile.frontend
restart: unless-stopped
ports:
- '192.168.28.10:18200:80'
depends_on:
backend:
condition: service_healthy
logging:
driver: json-file
options:
max-size: 10m
max-file: '3'
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost/ >/dev/null"]
interval: 30s
timeout: 5s
retries: 3