traefik_v2x/docker-compose.traefik.v2x.yml

30 lines
802 B
YAML

version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.9
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
ports:
# The HTTP port
- "80:80"
# The HTTPS Port
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
networks:
- traefik
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
- /docker/traefik_v2x/config/traefik.toml:/etc/traefik/traefik.toml
- /docker/traefik_v2x/config/acme.json:/acme.json
networks:
traefik:
external: true