services:
  audiobookshelf:
    extends:
      file: ${TEMPLATES_PATH}
      service: default
    image: ghcr.io/advplyr/audiobookshelf:2.32.1
    container_name: audiobookshelf
    ports:
      - 13378:80
    networks:
      - ip6net
    volumes:
      - ${AUDIOBOOKSHELF_EXTERNAL_PATH}:/audiobooks
      - ${MEDIA_PATH}/audiobookshelf/config:/config
      - ${MEDIA_PATH}/audiobookshelf/data/metadata:/metadata
    labels:
      # Traefik
      - "traefik.enable=true"
      - "traefik.http.routers.audiobookshelf.rule=Host(`audiobookshelf.${PUBLIC_DOMAIN}`)"
      - "traefik.http.routers.audiobookshelf.entrypoints=https"
      - "traefik.http.routers.audiobookshelf.tls=true"
