Created
November 10, 2020 18:44
-
-
Save djeikyb/23c468188ad7ccaafeb57ea79bcc7229 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10:43:31 ~/dev/play/traefik % cat t/docker-compose.yml ; cat a/docker-compose.yml ; cat b/docker-compose.yml | |
version: '3' | |
services: | |
reverse-proxy: | |
image: traefik # The official Traefik docker image | |
command: --api --docker --keeptrailingslash # Enables the web UI and tells Traefik to listen to docker | |
ports: | |
- "80:80" # The HTTP port | |
- "8080:8080" # The Web UI (enabled by --api) | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events | |
networks: | |
- b_default | |
- a_default | |
networks: | |
a_default: | |
external: true | |
b_default: | |
external: true | |
version: '3' | |
services: | |
whoami: | |
image: containous/whoami # A container that exposes an API to show its IP address | |
labels: | |
- "traefik.frontend.rule=Host:whoami.docker.localhost" | |
version: '3' | |
services: | |
hullo: | |
image: busybox | |
command: 'sh -c "while true; do echo -e \"HTTP/1.1 200 OK\n\n hullo\" | nc -l -p 8090; sleep 0.1; done"' | |
labels: | |
- "traefik.frontend.rule=Host:hullo.docker.localhost" | |
- "traefik.port=8090" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment