Skip to content

Commit 7c2c227

Browse files
authored
♻️ Simplify Traefik labels in services (#139)
1 parent baf584a commit 7c2c227

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

{{cookiecutter.project_slug}}/docker-compose.deploy.labels.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ services:
88
- traefik.port=5050
99
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
1010
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
11-
# Traefik service that listens to HTTP
12-
- traefik.redirectorservice.frontend.entryPoints=http
13-
- traefik.redirectorservice.frontend.redirect.entryPoint=https
14-
# Traefik service that listens to HTTPS
15-
- traefik.webservice.frontend.entryPoints=https
11+
- traefik.frontend.entryPoints=http,https
12+
- traefik.frontend.redirect.entryPoint=https
1613
proxy:
1714
deploy:
1815
labels:
@@ -25,18 +22,15 @@ services:
2522
- traefik.port=80
2623
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
2724
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
28-
# Traefik service that listens to HTTP
29-
- traefik.servicehttp.frontend.entryPoints=http
30-
- traefik.servicehttp.frontend.redirect.entryPoint=https
31-
# Traefik service that listens to HTTPS
32-
- traefik.servicehttps.frontend.entryPoints=https
25+
- traefik.frontend.entryPoints=http,https
26+
- traefik.frontend.redirect.entryPoint=https
3327
# Uncomment the config line below to detect and redirect www to non-www (or the contrary)
3428
# The lines above for traefik.frontend.rule are needed too
35-
# - "traefik.servicehttps.frontend.redirect.regex=^https?://(www.)?(${DOMAIN})/(.*)"
29+
# - "traefik.frontend.redirect.regex=^https?://(www.)?(${DOMAIN})/(.*)"
3630
# To redirect from non-www to www un-comment the line below
37-
# - "traefik.servicehttps.frontend.redirect.replacement=https://www.${DOMAIN}/$$3"
31+
# - "traefik.frontend.redirect.replacement=https://www.${DOMAIN}/$$3"
3832
# To redirect from www to non-www un-comment the line below
39-
# - "traefik.servicehttps.frontend.redirect.replacement=https://${DOMAIN}/$$3"
33+
# - "traefik.frontend.redirect.replacement=https://${DOMAIN}/$$3"
4034
flower:
4135
deploy:
4236
labels:
@@ -45,11 +39,8 @@ services:
4539
- traefik.port=5555
4640
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
4741
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
48-
# Traefik service that listens to HTTP
49-
- traefik.redirectorservice.frontend.entryPoints=http
50-
- traefik.redirectorservice.frontend.redirect.entryPoint=https
51-
# Traefik service that listens to HTTPS
52-
- traefik.webservice.frontend.entryPoints=https
42+
- traefik.frontend.entryPoints=http,https
43+
- traefik.frontend.redirect.entryPoint=https
5344
backend:
5445
deploy:
5546
labels:

0 commit comments

Comments
 (0)