Refactor Traefik deploy: docker-compose + systemd

- Replace docker_container ansible with new setup
- Add option to disable HTTPS for alternate reverse proxy use
This commit is contained in:
2023-04-21 03:04:53 -04:00
parent c67a39982e
commit 9512212b84
8 changed files with 75 additions and 49 deletions

View File

@@ -0,0 +1,25 @@
version: '3.7'
networks:
traefik:
name: traefik
services:
traefik:
image: "traefik:${traefik_version}"
container_name: "${traefik_name}"
ports:
- "${traefik_web_entry:-80:80}"
{% if traefik_standalone and not traefik_http_only %}
- "${traefik_websecure_entry:-443:443}"
{% endif %}
networks:
- traefik
labels:
- "traefik.http.routers.traefik.rule=Host(`{{ traefik_domain }}`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.docker.network=traefik"
- "traefik.enable=${traefik_dashboard:-false}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- "{{ traefik_root }}/config:/etc/traefik"