services:
  flowise:
    image: flowiseai/flowise:3.0.5
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - 1panel-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
    environment:
      - PORT=${PANEL_APP_PORT_HTTP}
      - DATABASE_PATH=${DATABASE_PATH}
      - SECRETKEY_PATH=${SECRETKEY_PATH}
      - LOG_PATH=${LOG_PATH}
      - BLOB_STORAGE_PATH=${BLOB_STORAGE_PATH}
      - JWT_AUTH_TOKEN_SECRET=${JWT_AUTH_TOKEN_SECRET}
      - JWT_REFRESH_TOKEN_SECRET=${JWT_REFRESH_TOKEN_SECRET}
      - JWT_ISSUER=${JWT_ISSUER}
      - JWT_AUDIENCE=${JWT_AUDIENCE}
      - JWT_TOKEN_EXPIRY_IN_MINUTES=${JWT_TOKEN_EXPIRY_IN_MINUTES}
      - JWT_REFRESH_TOKEN_EXPIRY_IN_MINUTES=${JWT_REFRESH_TOKEN_EXPIRY_IN_MINUTES}
    volumes:
      - flowise_data:${DATABASE_PATH}
    healthcheck:
      test:
        - CMD
        - curl
        - -f
        - http://localhost:${PANEL_APP_PORT_HTTP}/api/v1/ping
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s
    labels:
      createdBy: Apps
networks:
  1panel-network:
    external: true
volumes:
  flowise_data: null
