-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (29 loc) · 1.15 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.4
# Enables the web UI and tells Traefik to listen to docker
command: --api.insecure=true --providers.docker --log.level=DEBUG --api.dashboard=true
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
whoami:
# A container that exposes an API to show its IP address
image: traefik/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
webservice:
image: phipex/webservice:0.0.1-SNAPSHOT
# ports:
# - "8081:80"
labels:
# - "traefik.http.routers.webservice.rule=Host(`webservice.docker.localhost`) || (Host(`localhost`) && Path(`/webservice`))"
- "traefik.http.routers.webservice.rule=Host(`webservice.docker.localhost`) || (Path(`/webservice`))"
- "traefik.http.routers.webservice.service=webservice@docker"
- "traefik.http.services.webservice.loadbalancer.server.port=8081"