diff --git a/.env.sample b/.env.sample index 6b98ca2..e825a7f 100644 --- a/.env.sample +++ b/.env.sample @@ -65,6 +65,12 @@ COMPOSE_FILE="compose.yml" ## used used by the coop-cloud monitoring stack #METRICS_ENABLED=1 +##################################################################### +# File provider directory configuration # +# (Route bare metal and non-docker services on the machine!) # +##################################################################### +#FILE_PROVIDER_DIRECTORY_ENABLED=1 + ##################################################################### # Additional services # ##################################################################### diff --git a/abra.sh b/abra.sh index e8308fb..2b21995 100644 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,3 @@ export TRAEFIK_YML_VERSION=v15 -export FILE_PROVIDER_YML_VERSION=v6 +export FILE_PROVIDER_YML_VERSION=v7 export ENTRYPOINT_VERSION=v2 diff --git a/compose.yml b/compose.yml index 8790f10..4f4f206 100644 --- a/compose.yml +++ b/compose.yml @@ -13,6 +13,7 @@ services: volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "letsencrypt:/etc/letsencrypt" + - "file-providers:/etc/traefik/file-providers" configs: - source: traefik_yml target: /etc/traefik/traefik.yml @@ -69,3 +70,4 @@ configs: volumes: letsencrypt: + file-providers: diff --git a/traefik.yml.tmpl b/traefik.yml.tmpl index 84926fb..59e7c39 100644 --- a/traefik.yml.tmpl +++ b/traefik.yml.tmpl @@ -8,8 +8,14 @@ providers: exposedByDefault: false network: proxy swarmMode: true + {{ if eq (env "FILE_PROVIDER_DIRECTORY_ENABLED") "1" }} + file: + directory: /etc/traefik/file-providers + watch: true + {{ else }} file: filename: /etc/traefik/file-provider.yml + {{ end }} api: dashboard: {{ env "DASHBOARD_ENABLED" }}