apiVersion: fungi.rs/v1alpha1
kind: ServiceManifest

metadata:
  name: filebrowser

spec:
  runtime: docker

  expose:
    enabled: true
    serviceId: filebrowser
    displayName: File Browser
    transport:
      kind: tcp
    usage:
      kind: web
      path: /
    iconUrl: https://raw.githubusercontent.com/filebrowser/logo/master/icon.svg

  source:
    image: filebrowser/filebrowser:latest

  ports:
    - hostPort: auto
      name: http
      servicePort: 80
      protocol: tcp

  mounts:
    - hostPath: ${APP_HOME}/data
      runtimePath: /srv

  env:
    FB_NOAUTH: "true"

notes:
  - "Upstream project: https://github.com/filebrowser/filebrowser"
  - "${APP_HOME} resolves on the target node to fungi_home/services/<service-name>."
  - "hostPort: auto asks the target node to choose an available port from its allowed port policy."