version: "3.9"
services:
  prowlarr: # Should be exact same name as "id" field in config.json
    container_name: prowlarr # Should be exact same name as "id" field in config.json
    image: ghcr.io/linuxserver/prowlarr:1.11.4
    environment:
      - TZ=${TZ} # Can use any env variable. List in runtipi/templates/env-sample
    dns:
      - ${DNS_IP}
    volumes:
      - ${APP_DATA_DIR}/data/config:/config #Always start the path with ${APP_DATA_DIR}. This will put all data inside app-data/my-app/data
    ports:
      - ${APP_PORT}:9696
    restart: unless-stopped
    networks:
      - tipi_main_network
    labels:
      # Main
      traefik.enable: true
      traefik.http.middlewares.prowlarr-web-redirect.redirectscheme.scheme: https
      traefik.http.services.prowlarr.loadbalancer.server.port: 9696
      # Web
      traefik.http.routers.prowlarr-insecure.rule: Host(`${APP_DOMAIN}`)
      traefik.http.routers.prowlarr-insecure.entrypoints: web
      traefik.http.routers.prowlarr-insecure.service: prowlarr
      traefik.http.routers.prowlarr-insecure.middlewares: prowlarr-web-redirect
      # Websecure
      traefik.http.routers.prowlarr.rule: Host(`${APP_DOMAIN}`)
      traefik.http.routers.prowlarr.entrypoints: websecure
      traefik.http.routers.prowlarr.service: prowlarr
      traefik.http.routers.prowlarr.tls.certresolver: myresolver
      # Local domain
      traefik.http.routers.prowlarr-local-insecure.rule: Host(`prowlarr.${LOCAL_DOMAIN}`)
      traefik.http.routers.prowlarr-local-insecure.entrypoints: web
      traefik.http.routers.prowlarr-local-insecure.service: prowlarr
      traefik.http.routers.prowlarr-local-insecure.middlewares: prowlarr-web-redirect
      # Local domain secure
      traefik.http.routers.prowlarr-local.rule: Host(`prowlarr.${LOCAL_DOMAIN}`)
      traefik.http.routers.prowlarr-local.entrypoints: websecure
      traefik.http.routers.prowlarr-local.service: prowlarr
      traefik.http.routers.prowlarr-local.tls: true
