-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-traefik.yml
40 lines (37 loc) · 1.17 KB
/
docker-compose-traefik.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
39
version: "2.2"
services:
######################################## Traefik ########################################
traefik:
build:
context: .
dockerfile: docker/traefik/Dockerfile-v2-traefik
args:
TRAEFIK_VERSION: ${TRAEFIK_VERSION}
container_name: "traefik"
restart: unless-stopped
networks:
- traefik-net
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`traefik.hackinglab.local`)"
- "traefik.http.routers.api.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.tls=true"
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
######################################## whomai ########################################
whoami:
image: "containous/whoami"
container_name: "traefik-whoami"
restart: unless-stopped
networks:
- traefik-net
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.hackinglab.local`)"
- "traefik.http.routers.whoami.tls=true"
networks:
traefik-net: