save LE certificates on data disk

closes #25
This commit is contained in:
Pim Kunis 2023-04-24 13:47:18 +02:00
parent e6f64d4f4d
commit 37fe3937e5
3 changed files with 7 additions and 2 deletions

View file

@ -2,10 +2,14 @@
file: file:
path: "{{ service_dir }}" path: "{{ service_dir }}"
state: directory state: directory
- name: Create data directory
file:
path: "{{ data_dir }}"
state: directory
- name: Create acme file - name: Create acme file
copy: copy:
content: "" content: ""
dest: "{{ service_dir }}/acme.json" dest: "{{ data_dir }}/acme.json"
force: no force: no
mode: 0600 mode: 0600
- name: Copy Docker Compose script - name: Copy Docker Compose script

View file

@ -18,7 +18,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- {{ service_dir }}/traefik.toml:/etc/traefik/traefik.toml - {{ service_dir }}/traefik.toml:/etc/traefik/traefik.toml
- {{ service_dir }}/services.toml:/etc/traefik/services.toml - {{ service_dir }}/services.toml:/etc/traefik/services.toml
- {{ service_dir }}/acme.json:/acme.json - {{ data_dir }}/acme.json:/acme.json
networks: networks:
- traefik - traefik
labels: labels:

View file

@ -1,2 +1,3 @@
service_name: traefik service_name: traefik
service_dir: "{{ base_service_dir }}/{{ service_name }}" service_dir: "{{ base_service_dir }}/{{ service_name }}"
data_dir: "{{ base_data_dir }}/{{ service_name }}"