name: mediadna-workstation

services:
  workstation:
    image: smallfrogs/mediadna-workstation
    restart: unless-stopped
    init: true
    read_only: true
    cap_drop: [ALL]
    security_opt: [no-new-privileges:true]
    pids_limit: 160
    cpus: 2
    mem_limit: 2g
    stop_grace_period: 60s
    ports:
      # Replace 192.168.1.20 with your NAS local IP
      - "192.168.1.20:18751:8443"
    tmpfs:
      - /tmp:size=64m,mode=1777
    environment:
      # Replace 192.168.1.20 with your NAS local IP
      WORKSTATION_TLS_NAMES: localhost,127.0.0.1,192.168.1.20
      WORKSTATION_DISCOVERY_ADDRESS: 192.168.1.20
      WORKSTATION_DISCOVERY_PORT: 18751
      WORKSTATION_MEDIA_ROOTS: /media/library
      # Allow first-time admin password setup directly in the browser
      WORKSTATION_SETUP_MODE: web
    volumes:
      - mediadna_data:/var/lib/mediadna/data
      - mediadna_secrets:/var/lib/mediadna/secrets
      # Replace /volume1/video with your video folder
      - /volume1/video:/media/library:ro

volumes:
  mediadna_data:
  mediadna_secrets:
