diff --git a/playbook.yml b/playbook.yml index 1673aab..ecb719d 100644 --- a/playbook.yml +++ b/playbook.yml @@ -5,7 +5,7 @@ roles: - { role: docker, tags: ["docker"] } - { role: ssh, tags: ["ssh"] } -# - { role: traefik, tags: ["traefik"] } + - { role: traefik, tags: ["traefik"] } - { role: whoami, tags: ["whoami"] } - { role: protonmail, tags: ["protonmail"] } - { role: cloud, tags: ["cloud"] } diff --git a/roles/traefik/templates/docker-compose.yml.j2 b/roles/traefik/templates/docker-compose.yml.j2 index 7a128d6..829f582 100644 --- a/roles/traefik/templates/docker-compose.yml.j2 +++ b/roles/traefik/templates/docker-compose.yml.j2 @@ -17,6 +17,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock:ro - ./config/traefik.yml:/traefik.yml:ro - ./config/acme.json:/acme.json:rw + - {{ server.work_dir }}/traefik/base/access.log:/var/log/traefik/access.log:rw - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro extra_hosts: @@ -51,7 +52,7 @@ services: container_name: prometheus volumes: - ./prometheus/:/etc/prometheus/ - - prometheus:/prometheus + - {{ server.work_dir }}/traefik/prometheus:/prometheus - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro command: @@ -82,7 +83,7 @@ services: restart: unless-stopped container_name: grafana volumes: - - grafana:/var/lib/grafana + - {{ server.work_dir }}/traefik/grafana:/var/lib/grafana - ./grafana/provisioning:/etc/grafana/provisioning - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro @@ -105,6 +106,7 @@ services: - "traefik.http.routers.grafana-secure.service=grafana" - "traefik.http.services.grafana.loadbalancer.server.port=3000" - "traefik.docker.network=proxy" + http_provider: image: httpd:latest restart: unless-stopped @@ -120,7 +122,3 @@ networks: internal: proxy: external: true - -volumes: - prometheus: - grafana: