Quickstart
Setting up Millau locally is straightforward - all you need is Docker in Swarm mode.
1
Step 1: create the file
docker-compose.proxy.yml
services:
proxy:
image: codelev/millau:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "8080:80"
networks:
- millau
networks:
millau:
external: true
2
Step 2: create the file
docker-compose.service.yml
services:
whoami:
image: traefik/whoami
deploy:
mode: replicated
replicas: 3
labels:
- "millau.enabled=true"
- "millau.port=80"
ports:
- "80"
networks:
- millau
networks:
millau:
external: true
3
Step 3: create the network
docker network create --driver=overlay millau
4
Step 4: deploy the proxy
docker stack deploy -c docker-compose.proxy.yml proxy
5
Step 5: deploy the dervice
docker stack deploy -c docker-compose.service.yml service
Navigate to http://localhost:8080/
and refresh the page several times.
Sample output:
Hostname: 824d74bb8efc
IP: 127.0.0.1
IP: ::1
IP: 10.0.1.48
IP: 172.19.0.5
IP: 10.0.0.85
RemoteAddr: 10.0.1.44:55774
GET / HTTP/1.1
Host: localhost:8080
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-US,en;q=0.5
Connection: close
Priority: u=0, i
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Upgrade-Insecure-Requests: 1
X-Forwarded-For: 10.0.0.2
X-Forwarded-Proto: http