Skip to content
⚠️ This documentation, is under development. Expect changes!

Traefik

Create a folder in which to place the traefik data.

You can create a first file named compose.yml and put the following content in it

compose.yml
services:
traefik:
image: traefik:v3.3.6
container_name: traefik
restart: always
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml
- ./acme.json:/etc/traefik/certs/acme.json
- ./dynamic:/etc/traefik/dynamic
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:80"
- "443:443"
networks:
- proxy-net
labels:
traefik.enable: true
traefik.http.routers.proxy.entrypoints: web,websecure
traefik.http.routers.proxy.tls: true
traefik.http.routers.proxy.tls.certresolver: production
traefik.http.routers.proxy.rule: Host(`proxy.example.com`)
traefik.http.services.proxy.loadbalancer.server.port: 8080
traefik.http.routers.proxy.middlewares: proxy-auth@file, me@file
networks:
proxy-net:
name: proxy-network
driver: bridge

Once the configuration is complete, you can run the following command

Terminal window
docker compose up -d