services:
    readarr_books:
        container_name: readarr_books
        environment:
            - PUID=1000
            - PGID=1000
            - UMASK=002
            - TZ=America/Denver
        image: cr.hotio.dev/hotio/readarr:testing
        labels:
            traefik.docker.network: traefik
            traefik.enable: true
            traefik.http.routers.readarr_books.entrypoints: websecure
            traefik.http.routers.readarr_books.rule: Host(`readarrbooks.alexlebens.net`)
            traefik.http.routers.readarr_books.service: readarr_books
            traefik.http.routers.readarr_books.middlewares: readarr-space-gray-theme@file
            traefik.http.services.readarr_books.loadbalancer.server.port: 8787
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik:
                ipv4_address: 172.27.1.80
        restart: always
        privileged: true
        volumes:
            - readarr_books:/config
            - storage_nfs:/mnt/store

    readarr_audio:
        container_name: readarr_audio
        environment:
            - PUID=1000
            - PGID=1000
            - UMASK=002
            - TZ=America/Denver
        image: cr.hotio.dev/hotio/readarr:testing
        labels:
            traefik.docker.network: traefik
            traefik.enable: true
            traefik.http.routers.readarr_audio.entrypoints: websecure
            traefik.http.routers.readarr_audio.rule: Host(`readarraudio.alexlebens.net`)
            traefik.http.routers.readarr_audio.service: readarr_audio
            traefik.http.routers.readarr_audio.middlewares: readarr-aquamarine-theme@file
            traefik.http.services.readarr_audio.loadbalancer.server.port: 8787
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik:
                ipv4_address: 172.27.1.82
        restart: always
        privileged: true
        volumes:
            - readarr_audio:/config
            - storage_nfs:/mnt/store

    readarr_books_exporter:
        command: readarr
        container_name: readarr_books_exporter
        depends_on:
            - readarr_books
        environment:
            PORT: 9708
            URL: http://readarr_books:8787
            APIKEY: 1c1b9d5e69ec4b2aa1a85301d48d1573
        image: ghcr.io/onedr0p/exportarr:latest
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik:
                ipv4_address: 172.27.1.81
        restart: always

    readarr_audio_exporter:
        command: readarr
        container_name: readarr_audio_exporter
        depends_on:
            - readarr_audio
        environment:
            PORT: 9708
            URL: http://readarr_audio:8787
            APIKEY: 3be1176f6e6b461fa4f5eab9d39fd29f
        image: ghcr.io/onedr0p/exportarr:latest
        logging:
            driver: json-file
            options:
                max-size: 50m
                max-file: "3"
        networks:
            traefik:
                ipv4_address: 172.27.1.83
        restart: always

networks:
    traefik:
        name: traefik
        external: true

volumes:
    readarr_books:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/servarr_readarr_books

    readarr_audio:
        driver: local
        driver_opts:
            type: none
            o: bind
            device: /var/lib/docker/volumes/partition/servarr_readarr_audio

    storage_nfs:
        driver: local
        driver_opts:
            type: nfs
            o: addr=192.168.1.194,nfsvers=4
            device: :/volume2/Storage
