36 lines
853 B
Django/Jinja
36 lines
853 B
Django/Jinja
{% from "contrib/compose_helpers.j2" import traefik_labels with context %}
|
|
{##}
|
|
version: "3.7"
|
|
|
|
networks:
|
|
default:
|
|
traefik:
|
|
internal: true
|
|
ipam:
|
|
config:
|
|
- subnet: {{ traefik_ip }}/24
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:v2.9
|
|
container_name: traefik
|
|
labels:
|
|
- {{ traefik_labels("traefik", service="api@internal") | indent(6) }}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "8080:8080"
|
|
env_file:
|
|
- .env.traefik
|
|
networks:
|
|
default:
|
|
traefik:
|
|
ipv4_address: {{ traefik_ip }}
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./traefik.yml:/etc/traefik/traefik.yml:ro
|
|
- {{ base_volume_path }}/traefik/rules:/rules:ro
|
|
- {{ base_volume_path }}/traefik/logs:/logs
|
|
- {{ base_volume_path }}/traefik/acme:/acme
|