services:
  kuno:
    image: ictrun/kuno:v1.3.26
    container_name: ${CONTAINER_NAME}
    restart: unless-stopped
    pull_policy: always
    ports:
      - "${PANEL_APP_PORT_HTTP}:80"
    volumes:
      - ${DATA_PATH}:/app/data
      - ${DATA_PATH}/uploads:/app/frontend/public/uploads
    environment:
      - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
      - DB_PATH=/app/data/kuno.db
      - GIN_MODE=release
      - NODE_ENV=production
      - JWT_SECRET=${JWT_SECRET}
      - RECOVERY_MODE=${RECOVERY_MODE:-false}
      - TZ=Asia/Shanghai
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"
    networks:
      - 1panel-network

networks:
  1panel-network:
    external: true