-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
62 lines (59 loc) · 3.02 KB
/
docker-compose.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: "3"
networks:
traefik-proxy:
services:
######################################################################################################################
# Traefik
######################################################################################################################
traefik:
image: traefik
container_name: "traefik"
restart: unless-stopped
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik-proxy"
- "--entrypoints.web.address=:80"
- "--entrypoints.traefik.address=:9000"
- "--api.dashboard=true"
- "--api.insecure=true"
- "--experimental.localPlugins.redirect.moduleName=github.com/evolves-fr/traefik-plugin-redirect"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ".:/plugins-local/src/gitlab.com/evolves-fr/traefik-plugin-redirect"
ports:
- "80:80"
- "443:443"
- "9000:9000"
networks:
- traefik-proxy
######################################################################################################################
# Traefik
######################################################################################################################
whoami:
image: traefik/whoami
networks:
- traefik-proxy
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.local`)"
- "traefik.http.routers.whoami.entrypoints=web"
- "traefik.http.routers.whoami.middlewares=redirect"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[0].regex=/301$$"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[0].replacement=/moved-permanently"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[0].statusCode=301"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[1].regex=/302$$"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[1].replacement=/found"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[1].statusCode=302"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[2].regex=/307$$"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[2].replacement=/temporary-redirect"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[2].statusCode=307"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[3].regex=/308$$"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[3].replacement=/permanent-redirect"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[3].statusCode=308"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[4].regex=/404$$"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[4].statusCode=404"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[5].regex=/410$$"
- "traefik.http.middlewares.redirect.plugin.redirect.redirects[5].statusCode=410"