Port conflicts!
Caused by multiple services on one host
Routing of requests to correct container
Based on Host
header in HTTP and SNI in HTTPS
HTTP(S)
Automatic certificates
Dynamic wiring
–
HTTP: Routing based on Host
header
HTTPS: Routing based on Server Name Indication (SNI)
Can even use separate networks for frontend and backend
–
Automatic wiring using Traefik:
docker-compose up -d
IP=$(
docker-compose ps -q proxy | \
xargs docker inspect \
-f ''
)
Use network_mode: host
to avoid port publishing
Testing access:
curl --silent --resolve hub.dille.io:80:$IP \
http://hub.dille.io
curl --silent --resolve registry.dille.io:$IP \
http://registry.dille.io/v2/