Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Simplify Traefik labels for services #27

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 11 additions & 23 deletions {{cookiecutter.project_slug}}/docker-compose.deploy.labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ services:
- traefik.port=8091
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
- traefik.frontend.entryPoints=http,https
- traefik.frontend.redirect.entryPoint=https
sync-gateway:
deploy:
labels:
Expand All @@ -21,11 +18,8 @@ services:
- traefik.port=4984
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
- traefik.frontend.entryPoints=http,https
- traefik.frontend.redirect.entryPoint=https
proxy:
deploy:
labels:
Expand All @@ -38,18 +32,15 @@ services:
- traefik.port=80
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
# Traefik service that listens to HTTP
- traefik.servicehttp.frontend.entryPoints=http
- traefik.servicehttp.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.servicehttps.frontend.entryPoints=https
- traefik.frontend.entryPoints=http,https
- traefik.frontend.redirect.entryPoint=https
# Uncomment the config line below to detect and redirect www to non-www (or the contrary)
# The lines above for traefik.frontend.rule are needed too
# - "traefik.servicehttps.frontend.redirect.regex=^https?://(www.)?(${DOMAIN})/(.*)"
# - "traefik.frontend.redirect.regex=^https?://(www.)?(${DOMAIN})/(.*)"
# To redirect from non-www to www un-comment the line below
# - "traefik.servicehttps.frontend.redirect.replacement=https://www.${DOMAIN}/$$3"
# - "traefik.frontend.redirect.replacement=https://www.${DOMAIN}/$$3"
# To redirect from www to non-www un-comment the line below
# - "traefik.servicehttps.frontend.redirect.replacement=https://${DOMAIN}/$$3"
# - "traefik.frontend.redirect.replacement=https://${DOMAIN}/$$3"
flower:
deploy:
labels:
Expand All @@ -58,11 +49,8 @@ services:
- traefik.port=5555
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
- traefik.frontend.entryPoints=http,https
- traefik.frontend.redirect.entryPoint=https
backend:
deploy:
labels:
Expand Down