# documentation: https://github.com/sysadminsmedia/homebox
# slogan: Homebox is the inventory and organization system built for the Home User.
# category: productivity
# tags: inventory, home, organize
# logo: svgs/homebox.svg
# port: 7745

services:
  homebox:
    image: ghcr.io/sysadminsmedia/homebox:latest
    environment:
      - SERVICE_URL_HOMEBOX_7745
      - HBOX_OPTIONS_ALLOW_REGISTRATION=${HBOX_OPTIONS_ALLOW_REGISTRATION:-false}
      - HBOX_LOG_LEVEL=${HBOX_LOG_LEVEL:-info}
      - HBOX_LOG_FORMAT=${HBOX_LOG_FORMAT:-text}
      - HBOX_WEB_MAX_UPLOAD_SIZE=${HBOX_WEB_MAX_UPLOAD_SIZE:-10}
      - HBOX_MAILER_HOST=${HBOX_MAILER_HOST}
      - HBOX_MAILER_PORT=${HBOX_MAILER_PORT:-587}
      - HBOX_MAILER_USERNAME=${HBOX_MAILER_USERNAME}
      - HBOX_MAILER_PASSWORD=${HBOX_MAILER_PASSWORD}
      - HBOX_MAILER_FROM=${HBOX_MAILER_FROM}
    volumes:
      - homebox-data:/data
    healthcheck:
      test: ["CMD", "sh", "-c", "wget --method=GET -qO- http://localhost:7745/api/v1/status > /dev/null || exit 1"]
      interval: 30s
      timeout: 5s
      retries: 10
