Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://localhost:8888 -> traefik dashboard
- # http://localhost:9999 -> application
- version: '3'
- services:
- traefik:
- image: traefik:v2.0
- command:
- - "--api.insecure=true"
- - "--providers.docker=true"
- - "--entryPoints.web.address=:9999"
- ports:
- - 8888:8080
- - 9999:9999
- volumes:
- - /var/run/docker.sock:/var/run/docker.sock
- # docker run --rm -it -p 9999:3000 adongy/hostname-docker
- hostname:
- image: adongy/hostname-docker
- labels:
- - "traefik.enable=true"
- - traefik.http.routers.hostname.rule=Host(`localhost`)
- - traefik.http.middlewares.hostname.compress=true
- - traefik.http.routers.hostname.middlewares=hostname@docker
- - traefik.port=3000
- # docker-compose up -d --no-deps --scale hostname=5
Add Comment
Please, Sign In to add comment