version: "2.4"
services:
  sonarr:
    image: filebrowser/filebrowser
    container_name: files
    environment:
      VIRTUAL_HOST: "files.home.toozhao.com"
      VIRTUAL_PORT: 80
      LETSENCRYPT_HOST: "files.home.toozhao.com"
      LETSENCRYPT_EMAIL: "me@toozhao.com"
    volumes:
      - ./filebrowser.db:/database.db
      - ./filebrowser.json:/.filebrowser.json
      - /mnt/downloads:/files/downloads:ro
      - /mnt/books:/files/books:ro
      - /mnt/editables:/files/editables
    restart: unless-stopped
    networks:
      - gateway_default
    mem_limit: 1024m
    mem_reservation: 128m
    cpu_percent: 20
networks:
  gateway_default:
    external: true
