Keep fixed and dynamic config indepedent
This commit is contained in:
@@ -22,7 +22,10 @@ services:
|
||||
- traefik
|
||||
- docker
|
||||
volumes:
|
||||
- traefik_config:/etc/traefik/
|
||||
- traefik_dynamic_config:/etc/traefik/dynamic/
|
||||
configs:
|
||||
- source: traefik_config
|
||||
target: /etc/traefik/traefik.yml
|
||||
depends_on:
|
||||
- docker
|
||||
restart: unless-stopped
|
||||
@@ -69,7 +72,7 @@ volumes:
|
||||
device: ${SERVICES_DIR?}/portainer/volumes/data/
|
||||
labels:
|
||||
nas-compose.boostrap: true
|
||||
traefik_config:
|
||||
traefik_dynamic_config:
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
@@ -77,6 +80,10 @@ volumes:
|
||||
labels:
|
||||
nas-compose.boostrap: true
|
||||
|
||||
configs:
|
||||
traefik_config:
|
||||
file: ${SERVICES_DIR?}/traefik/configs/traefik.yml
|
||||
|
||||
secrets:
|
||||
portainer_password:
|
||||
file: ${SERVICES_DIR?}/portainer/secrets/portainer_password
|
||||
|
||||
32
services/traefik/configs/traefik.yml
Normal file
32
services/traefik/configs/traefik.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
providers:
|
||||
docker:
|
||||
endpoint: tcp://docker:2375
|
||||
exposedByDefault: false
|
||||
network: traefik
|
||||
defaultRule: Host(`{{ index .Labels "com.docker.compose.service" }}.dev.dedicated.contact`)
|
||||
file:
|
||||
directory: /etc/traefik/dynamic/
|
||||
|
||||
serverstransport:
|
||||
insecureskipverify: true
|
||||
|
||||
api:
|
||||
insecure: true
|
||||
|
||||
accessLog: {}
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: :80
|
||||
http:
|
||||
# redirections:
|
||||
# entryPoint:
|
||||
# to: websecure
|
||||
# scheme: https
|
||||
websecure:
|
||||
address: :443
|
||||
http:
|
||||
tls: {}
|
||||
|
||||
global:
|
||||
sendAnonymousUsage: false
|
||||
@@ -1,5 +0,0 @@
|
||||
http:
|
||||
routers:
|
||||
traefik:
|
||||
rule: Host(`traefik.dev.dedicated.contact`)
|
||||
service: api@internal
|
||||
@@ -1,32 +1,5 @@
|
||||
providers:
|
||||
docker:
|
||||
endpoint: tcp://docker:2375
|
||||
exposedByDefault: false
|
||||
network: traefik
|
||||
defaultRule: Host(`{{ index .Labels "com.docker.compose.service" }}.dev.dedicated.contact`)
|
||||
file:
|
||||
directory: /etc/traefik/dynamic/
|
||||
|
||||
serverstransport:
|
||||
insecureskipverify: true
|
||||
|
||||
api:
|
||||
insecure: true
|
||||
|
||||
accessLog: {}
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: :80
|
||||
http:
|
||||
# redirections:
|
||||
# entryPoint:
|
||||
# to: websecure
|
||||
# scheme: https
|
||||
websecure:
|
||||
address: :443
|
||||
http:
|
||||
tls: {}
|
||||
|
||||
global:
|
||||
sendAnonymousUsage: false
|
||||
routers:
|
||||
traefik:
|
||||
rule: Host(`traefik.dev.dedicated.contact`)
|
||||
service: api@internal
|
||||
|
||||
Reference in New Issue
Block a user