traefik

traefik 是一个api网关,还没学完,持续更新:

1搭建起来之后,需要根据TOML文件来进行请求配置,类似于struts2里面的前端控制器的一个xml:

traefik_第1张图片

traefik_第2张图片



version: '3'

services:
reverse-proxy:
image: traefik # The official Traefik docker image
command: --api --docker # Enables the web UI and tells Træfik 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 Traef
whoami:
image: emilevauge/whoami # A container that exposes an API to show its IP address
labels:
- "traefik.frontend.rule:whoami.docker.localhost"

你可能感兴趣的:(计算机,docker)