Skip to content

Instantly share code, notes, and snippets.

@LarsNieuwenhuizen
Created January 3, 2018 15:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsNieuwenhuizen/aa44972315184ae436eb344467c8782d to your computer and use it in GitHub Desktop.
Save LarsNieuwenhuizen/aa44972315184ae436eb344467c8782d to your computer and use it in GitHub Desktop.
Traefik & Docker basic example
version: '3.4'
services:
proxy:
image: traefik:1.4-alpine
command: --web --docker --docker.domain=docker.localhost
networks:
- traefik
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
apache:
image: httpd:alpine
labels:
- "traefik.frontend.rule=Host:apache.localhost"
networks:
- traefik
nginx:
image: nginx:alpine
labels:
- "traefik.frontend.rule=Host:nginx.localhost"
networks:
- traefik
networks:
traefik:
external: true
@LarsNieuwenhuizen
Copy link
Author

A simple example to apply Traefik with docker. https://developers.vision/traefik-reverse-proxy/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment