Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Created October 4, 2023 07:41
Show Gist options
  • Select an option

  • Save arsalanses/c1b3b1b03036e6a4982c4b5c0e46f87c to your computer and use it in GitHub Desktop.

Select an option

Save arsalanses/c1b3b1b03036e6a4982c4b5c0e46f87c to your computer and use it in GitHub Desktop.
Traefik with multiple projects
services:
web:
labels:
- "traefik.http.routers.proj.rule=Host(`proj.traefik.me`)"
- "traefik.http.services.proj.loadbalancer.server.port=8000"
- "traefik.docker.network=traefik"
networks:
- default
- traefik
networks:
traefik:
external: true
services:
reverse-proxy:
image: traefik:v2.10
restart: unless-stopped
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- traefik
networks:
traefik:
attachable: true
name: traefik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment