28 lines
1.0 KiB
YAML
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
|
|
- /Rancher/${DATA_DIR}/Configuration/traefik.toml:/traefik.toml
|
|
- /Rancher/${DATA_DIR}/LetsEncrypt/acme.json:/acme.json # For Let's Encrypt certificates
|
|
- /Rancher/${DATA_DIR}/Logs:/external/logs |