traefik: refactor macro, remove old traefik network remnants
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(249) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
gluetun:
|
||||
@@ -16,9 +14,6 @@ services:
|
||||
env_file:
|
||||
- .env.gluetun
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/arrstack/gluetun:/gluetun
|
||||
|
||||
@@ -49,9 +44,6 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- qbittorrent
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/arrstack/config/prowlarr:/config
|
||||
|
||||
@@ -63,9 +55,6 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- qbittorrent
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/arrstack/config/sonarr:/config
|
||||
- {{ base_volume_path }}/arrstack/downloads:/downloads
|
||||
@@ -79,9 +68,6 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- qbittorrent
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/arrstack/config/radarr:/config
|
||||
- {{ base_volume_path }}/arrstack/downloads:/downloads
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(199) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
server:
|
||||
@@ -14,9 +12,6 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.gitea
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/gitea/gitea:/data
|
||||
depends_on:
|
||||
@@ -27,7 +22,5 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.db
|
||||
networks:
|
||||
- default
|
||||
volumes:
|
||||
- {{ base_volume_path }}/gitea/postgres:/var/lib/postgresql/data
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(197) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
jellyfin:
|
||||
@@ -14,9 +12,6 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.jellyfin
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/jellyfin/config:/config
|
||||
- {{ base_volume_path }}/jellyfin/cache:/cache
|
||||
|
@@ -2,9 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(198) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
|
||||
services:
|
||||
app:
|
||||
@@ -18,8 +15,6 @@ services:
|
||||
- redis
|
||||
env_file:
|
||||
- .env.nextcloud
|
||||
networks:
|
||||
- default
|
||||
volumes:
|
||||
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
||||
- {{ base_volume_path }}/nextcloud/nextcloud_config:/var/www/html/config
|
||||
@@ -32,8 +27,6 @@ services:
|
||||
depends_on:
|
||||
- app
|
||||
entrypoint: /cron.sh
|
||||
networks:
|
||||
- default
|
||||
volumes:
|
||||
- {{ base_volume_path }}/nextcloud/nextcloud:/var/www/html
|
||||
- {{ base_volume_path }}/nextcloud/nextcloud_config:/var/www/html/config
|
||||
@@ -42,16 +35,8 @@ services:
|
||||
notify_push:
|
||||
image: nextcloud:${NEXTCLOUD_VERSION}
|
||||
container_name: nextcloud_notify_push
|
||||
{# TODO: Refactor this and minio -#}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.nc-notify.rule=Host(`nc.{{ domain }}`) && PathPrefix(`/push`)
|
||||
- traefik.http.routers.nc-notify.entrypoints=websecure
|
||||
- traefik.http.routers.nc-notify.tls=true
|
||||
- traefik.http.routers.nc-notify.tls.certresolver=letsencrypt
|
||||
- traefik.http.routers.nc-notify.tls.domains.0.main={{ domain }}
|
||||
- traefik.http.routers.nc-notify.tls.domains.0.sans=*.{{ domain }}
|
||||
- traefik.http.services.nc-notify.loadbalancer.server.port=7867
|
||||
- {{ helpers.traefik_labels('nc', port='7867', path_prefix='/push') | indent(6) }}
|
||||
restart: unless-stopped
|
||||
user: www-data
|
||||
env_file:
|
||||
@@ -68,8 +53,6 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.db
|
||||
networks:
|
||||
- default
|
||||
volumes:
|
||||
- {{ base_volume_path }}/nextcloud/db:/var/lib/postgresql/data
|
||||
|
||||
@@ -79,8 +62,6 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.redis
|
||||
networks:
|
||||
- default
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(253) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
server:
|
||||
@@ -21,9 +19,6 @@ services:
|
||||
command: server
|
||||
env_file:
|
||||
- .env.authentik
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
|
||||
worker:
|
||||
image: ghcr.io/goauthentik/server:latest
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(252) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
minio:
|
||||
@@ -11,22 +9,11 @@ services:
|
||||
container_name: minio
|
||||
labels:
|
||||
- {{ helpers.traefik_labels('minio', port='9090') | indent(6) }}
|
||||
- traefik.http.routers.minio.service=minio
|
||||
- traefik.http.routers.minio-tls.service=minio
|
||||
- traefik.http.routers.minio-s3.rule=Host(`s3.{{ domain }}`) || HostRegexp(`^.+[.]s3[.]{{ domain }}`)
|
||||
- traefik.http.routers.minio-s3.entrypoints=websecure
|
||||
- traefik.http.routers.minio-s3.tls=true
|
||||
- traefik.http.routers.minio-s3.tls.certresolver=letsencrypt
|
||||
- traefik.http.routers.minio-s3.tls.domains.0.main=s3.{{ domain }}
|
||||
- traefik.http.routers.minio-s3.tls.domains.0.sans=*.s3.{{ domain }}
|
||||
- traefik.http.routers.minio-s3.service=minio-s3
|
||||
- traefik.http.services.minio-s3.loadbalancer.server.port=9000
|
||||
- {{ helpers.traefik_labels('s3', port='9000') | indent(6) }}
|
||||
- {{ helpers.traefik_labels('s3', port='9000', wildcard=true) | indent(6) }}
|
||||
restart: unless-stopped
|
||||
command: server --console-address ":9090" /data
|
||||
env_file:
|
||||
- .env.minio
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/minio/data:/data
|
||||
|
@@ -2,8 +2,6 @@
|
||||
|
||||
networks:
|
||||
{{ helpers.default_network(251) | indent(2) }}
|
||||
traefik_traefik:
|
||||
external: true
|
||||
|
||||
services:
|
||||
grafana:
|
||||
@@ -17,9 +15,6 @@ services:
|
||||
restart: unless-stopped
|
||||
# Needed to make config files readable (not anymore, TODO: remove)
|
||||
user: "{{ remote_uid }}"
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/monitoring/grafana:/var/lib/grafana
|
||||
- ./grafana_config/grafana.ini:/etc/grafana/grafana.ini:ro
|
||||
@@ -103,9 +98,6 @@ services:
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.influxdb
|
||||
networks:
|
||||
- default
|
||||
- traefik_traefik
|
||||
volumes:
|
||||
- {{ base_volume_path }}/monitoring/influxdb:/var/lib/influxdb2
|
||||
|
||||
|
@@ -1,14 +1,7 @@
|
||||
{% import 'contrib/compose_helpers.j2' as helpers with context %}
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
internal: true
|
||||
enable_ipv6: true
|
||||
ipam:
|
||||
config:
|
||||
# TODO: Consider removing traefik network, it shouldn't be needed with host networking
|
||||
- subnet: {{ traefik_subnet }}/24
|
||||
- subnet: {{ docker_ipv6_subnet | ansible.utils.ipsubnet(80, 255) }}
|
||||
{{ helpers.default_network(254) | indent(2) }}
|
||||
|
||||
services:
|
||||
traefik:
|
||||
@@ -25,11 +18,8 @@ services:
|
||||
- {{ base_volume_path }}/traefik/rules:/rules/extra:ro
|
||||
- {{ base_volume_path }}/traefik/acme:/acme
|
||||
|
||||
# This is mostly just so that the traefik network gets created
|
||||
whoami:
|
||||
image: containous/whoami
|
||||
container_name: whoami
|
||||
labels:
|
||||
- {{ helpers.traefik_labels('whoami', port=80) | indent(6) }}
|
||||
networks:
|
||||
- traefik
|
||||
- {{ helpers.traefik_labels('whoami', port='80') | indent(6) }}
|
||||
|
@@ -36,7 +36,6 @@ certificatesResolvers:
|
||||
providers:
|
||||
docker:
|
||||
exposedByDefault: false
|
||||
network: traefik_traefik
|
||||
file:
|
||||
directory: /rules
|
||||
watch: true
|
||||
|
Reference in New Issue
Block a user