2018-03-22 11:34:03 +00:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
2018-10-17 14:24:04 +00:00
|
|
|
# The reverse proxy service (Traefik)
|
2018-03-22 11:34:03 +00:00
|
|
|
reverse-proxy:
|
2018-08-01 09:22:03 +00:00
|
|
|
image: traefik # The official Traefik docker image
|
2018-10-17 14:24:04 +00:00
|
|
|
command: --api --docker # Enables the web UI and tells Traefik to listen to docker
|
2018-03-22 11:34:03 +00:00
|
|
|
ports:
|
2018-08-01 09:22:03 +00:00
|
|
|
- "80:80" # The HTTP port
|
|
|
|
- "8080:8080" # The Web UI (enabled by --api)
|
2018-03-22 11:34:03 +00:00
|
|
|
volumes:
|
2018-08-01 09:22:03 +00:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
|
2018-03-22 11:34:03 +00:00
|
|
|
|
2018-08-01 09:22:03 +00:00
|
|
|
# A container that exposes a simple API
|
2018-03-22 11:34:03 +00:00
|
|
|
whoami:
|
2019-01-18 14:18:04 +00:00
|
|
|
image: containous/whoami # A container that exposes an API to show its IP address
|
2018-03-22 11:34:03 +00:00
|
|
|
labels:
|
2018-08-01 09:22:03 +00:00
|
|
|
- "traefik.frontend.rule=Host:whoami.docker.localhost"
|