services:
  toonflow:
    build:
      context: ..
      dockerfile: docker/Dockerfile
      args:
        GIT: ${GIT:-github}
        TAG: ${TAG:-}
        BRANCH: ${BRANCH:-}
    image: toonflow:${TAG:-latest}
    container_name: toonflow
    restart: unless-stopped
    ports:
      - "80"
      - "10588:10588"
    environment:
      - NODE_ENV=prod
    volumes:
      # 可选: 持久化日志
      - ../logs:/var/log
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
