services:
  minerva-dashboard:
    container_name: minerva-dashboard
    build:
      context: .
      dockerfile: Dockerfile
    restart: unless-stopped
    ports:
      - "8094:8094"
    env_file:
      - .env
    environment:
      TZ: ${TZ}
      MINERVA_HOST: ${MINERVA_HOST:-0.0.0.0}
      MINERVA_PORT: ${MINERVA_PORT:-8094}
      MINERVA_STATE_DIR: ${MINERVA_STATE_DIR:-/data/state}
      MINERVA_SHARED_PASSWORD: ${MINERVA_SHARED_PASSWORD:-}
    volumes:
      - /mnt/docker-ssd/docker/appdata/minerva-dashboard:/data
    healthcheck:
      test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8094/api/health || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    networks:
      - minerva-dashboard-net

networks:
  minerva-dashboard-net:
    driver: bridge
