Keep fixed and dynamic config indepedent
This commit is contained in:
@@ -22,7 +22,10 @@ services:
|
|||||||
- traefik
|
- traefik
|
||||||
- docker
|
- docker
|
||||||
volumes:
|
volumes:
|
||||||
- traefik_config:/etc/traefik/
|
- traefik_dynamic_config:/etc/traefik/dynamic/
|
||||||
|
configs:
|
||||||
|
- source: traefik_config
|
||||||
|
target: /etc/traefik/traefik.yml
|
||||||
depends_on:
|
depends_on:
|
||||||
- docker
|
- docker
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -69,7 +72,7 @@ volumes:
|
|||||||
device: ${SERVICES_DIR?}/portainer/volumes/data/
|
device: ${SERVICES_DIR?}/portainer/volumes/data/
|
||||||
labels:
|
labels:
|
||||||
nas-compose.boostrap: true
|
nas-compose.boostrap: true
|
||||||
traefik_config:
|
traefik_dynamic_config:
|
||||||
driver_opts:
|
driver_opts:
|
||||||
type: none
|
type: none
|
||||||
o: bind
|
o: bind
|
||||||
@@ -77,6 +80,10 @@ volumes:
|
|||||||
labels:
|
labels:
|
||||||
nas-compose.boostrap: true
|
nas-compose.boostrap: true
|
||||||
|
|
||||||
|
configs:
|
||||||
|
traefik_config:
|
||||||
|
file: ${SERVICES_DIR?}/traefik/configs/traefik.yml
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
portainer_password:
|
portainer_password:
|
||||||
file: ${SERVICES_DIR?}/portainer/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:
|
http:
|
||||||
docker:
|
routers:
|
||||||
endpoint: tcp://docker:2375
|
traefik:
|
||||||
exposedByDefault: false
|
rule: Host(`traefik.dev.dedicated.contact`)
|
||||||
network: traefik
|
service: api@internal
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user