traefik - add dynamic config directory

This commit is contained in:
Ludovic Cartier 2024-06-13 14:05:09 +02:00
parent b4bf561692
commit ccbe5f6a41
2 changed files with 14 additions and 2 deletions

View File

@ -14,13 +14,13 @@
name: 'traefik'
tags: ['docker_traefik']
- name: traefik | create letsencrypt docker volume
- name: traefik | create letsencrypt docker volume
docker_volume:
name: traefik__letsencrypt
register: register_docker_volume_traefik__letsencrypt
tags: ['docker_traefik']
- name: traefik | create config docker volume
- name: traefik | create config docker volume
docker_volume:
name: traefik__etc_traefik
register: register_docker_volume_traefik__etc_traefik
@ -35,3 +35,10 @@
mode: 0644
notify: traefik-restart
tags: ['docker_traefik']
- name: traefik | create dynamic config path
file:
path: /var/lib/docker/volumes/traefik__etc_traefik/_data/dynamic
state: directory
mode: '0755'
tags: ['docker_traefik']

View File

@ -33,3 +33,8 @@ certificatesResolvers:
email: {{ traefik_letsencrypt_email }}
storage: /letsencrypt/acme.json
tlschallenge: true
providers:
file:
directory: /etc/traefik/dynamic
watch: true