services:
  audiobookshelf:
    image: ghcr.io/advplyr/audiobookshelf:latest
    restart: unless-stopped
    ports:
      - 13378:80 # remove if you're using a proxy
    volumes:
      - /media/NAS/Audiobooks:/audiobooks
      # - </path/to/podcasts>:/podcasts
      - /home/ubuntu/docker/audiobookshelf:/config
      - /home/ubuntu/docker/audiobookshelf:/metadata
    environment:
      - TZ=Europe/London
    networks:
      - proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.audiobookshelf.entrypoints=http"
      - "traefik.http.routers.audiobookshelf.rule=Host(`audiobookshelf.jimsgarage.co.uk`)"
      - "traefik.http.middlewares.audiobookshelf-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.audiobookshelf.middlewares=audiobookshelf-https-redirect"
      - "traefik.http.routers.audiobookshelf-secure.entrypoints=https"
      - "traefik.http.routers.audiobookshelf-secure.rule=Host(`audiobookshelf.jimsgarage.co.uk`)"
      - "traefik.http.routers.audiobookshelf-secure.tls=true"
      - "traefik.http.routers.audiobookshelf-secure.service=audiobookshelf"
      - "traefik.http.services.audiobookshelf.loadbalancer.server.port=80"
      - "traefik.docker.network=proxy"

networks:
  proxy:
    external: true