Skip to content

Instantly share code, notes, and snippets.

@rahulhaque
Last active September 9, 2023 04:57
Show Gist options
  • Save rahulhaque/3801a0fbb5cb2b8f0f060a364f494cb7 to your computer and use it in GitHub Desktop.
Save rahulhaque/3801a0fbb5cb2b8f0f060a364f494cb7 to your computer and use it in GitHub Desktop.
Setup Traefik in a minute

Setup Traefik in a Minute

This setup procedure is only for local environment

  1. Create a config file in home ~/.traefik/traefik.yml and copy paste the following content there.
global:
  checkNewVersion: true
  sendAnonymousUsage: false

entryPoints:
  web:
    address: :80

api:
  insecure: true

providers:
  docker:
    exposedByDefault: false
  1. Start Traefik by running the following command.
docker run -d -p 8080:8080 -p 80:80 --name traefik \                       
--net laravel-cruise --restart always \
-v ~/.traefik/traefik.yml:/etc/traefik/traefik.yml \
-v /var/run/docker.sock:/var/run/docker.sock \
traefik:latest
  1. Visit http://localhost:8080/ to view the dashboard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment