services: {% for name, service in arr_services.items() %} {{ name }}: image: {{ service.image }} restart: unless-stopped env_file: .env {% if arr_routing_mode == "host" %} ports: - "{{ service.port }}:{{ service.port }}" {% endif %} {% if arr_routing_mode == "traefik" %} # internal service port: {{ service.port }}; not published on the Docker host labels: - traefik.enable=true - traefik.http.routers.{{ name }}.rule=Host(`{{ service.domain }}`) - traefik.http.routers.{{ name }}.entrypoints={{ arr_traefik_entrypoint }} - traefik.http.routers.{{ name }}.tls={{ arr_traefik_tls | bool | ternary('true', 'false') }} - traefik.http.services.{{ name }}.loadbalancer.server.port={{ service.port }} networks: - {{ arr_traefik_network }} {% endif %} volumes: - {{ arr_config_root }}/{{ name }}:/config - {{ arr_media_root }}:/media - {{ arr_downloads_root }}:/downloads {% endfor %} {% if arr_routing_mode == "traefik" %} networks: {{ arr_traefik_network }}: external: true {% endif %}