Fix configuration paths (err letsencrypt)
This commit is contained in:
parent
f22495d3c5
commit
9e1f369572
|
|
@ -8,26 +8,34 @@
|
|||
ansible.builtin.file:
|
||||
path: "{{ pangolin_base_path }}/pangolin_config"
|
||||
state: directory
|
||||
register: pangolin_config_dir
|
||||
|
||||
- name: Template Pangolin config file
|
||||
ansible.builtin.template:
|
||||
src: pangolin_config.yml.j2
|
||||
dest: "{{ pangolin_base_path }}/pangolin_config/config.yaml"
|
||||
dest: "{{ pangolin_config_dir.path }}/config.yaml"
|
||||
|
||||
- name: Ensure Letsencrypt config directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ pangolin_config_dir.path }}/letsencrypt"
|
||||
state: directory
|
||||
register: letsencrypt_config_directory
|
||||
|
||||
- name: Ensure Traefik config directory exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ pangolin_base_path }}/config/traefik"
|
||||
path: "{{ pangolin_config_dir.path }}/traefik"
|
||||
state: directory
|
||||
register: traefik_config_directory
|
||||
|
||||
- name: Template Traefik config file
|
||||
ansible.builtin.template:
|
||||
src: traefik_config.yml.j2
|
||||
dest: "{{ pangolin_base_path }}/config/traefik/traefik_config.yml"
|
||||
dest: "{{ traefik_config_directory.path }}/traefik_config.yml"
|
||||
|
||||
- name: Template Traefik dynamic config file
|
||||
ansible.builtin.template:
|
||||
src: dynamic_config.yml.j2
|
||||
dest: "{{ pangolin_base_path }}/config/traefik/dynamic_config.yml"
|
||||
dest: "{{ traefik_config_directory.path }}/dynamic_config.yml"
|
||||
|
||||
- name: Template docker-compose.yml for Pangolin
|
||||
ansible.builtin.template:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ services:
|
|||
container_name: pangolin
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./pangolin_config:/app/config
|
||||
- ./{{ pangolin_config_dir.path }}:/app/config
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3001/api/v1/"]
|
||||
interval: "3s"
|
||||
|
|
@ -45,9 +45,9 @@ services:
|
|||
command:
|
||||
- --configFile=/etc/traefik/traefik_config.yml
|
||||
volumes:
|
||||
- ./config/traefik:/etc/traefik:ro # Volume to store the Traefik configuration
|
||||
- ./config/letsencrypt:/letsencrypt # Volume to store the Let's Encrypt certificates
|
||||
- ./config/traefik/logs:/var/log/traefik # Volume to store Traefik logs
|
||||
- ./{{ traefik_config_directory.path }}:/etc/traefik:ro # Volume to store the Traefik configuration
|
||||
- ./{{ letsencrypt_config_directory.path }}:/letsencrypt # Volume to store the Let's Encrypt certificates
|
||||
- ./{{ traefik_config_directory.path }}/logs:/var/log/traefik # Volume to store Traefik logs
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
|
|
|
|||
Loading…
Reference in New Issue