Files
Personal-Rancher-Catalog/templates/Traefik/0/docker-compose.yml

28 lines
1.0 KiB
YAML

version: '2'
services:
traefik:
image: traefik:latest
command: --api # Using Rancher API
dns:
- 1.1.1.1 # Cloudflare Public DNS 1
- 1.0.0.1 # Cloudflare Public DNS 2
labels:
io.rancher.container.agent.role: environment
io.rancher.container.create_agent: true
io.rancher.container.pull_image: always
{{- if (.Values.HOST_LABEL)}}
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
{{- end}}
ports:
- "${DASHBOARD_PORT}:8080"
- "80:80" # HTTP
- "443:443" # HTTPS
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system
- /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system
- /RancherCattle/${DATA_DIR}/Configuration/traefik.toml:/traefik.toml
- /RancherCattle/${DATA_DIR}/LetsEncrypt/acme.json:/acme.json # For Let's Encrypt certificates
- /RancherCattle/${DATA_DIR}/Logs:/external/logs