Files
full-stack-fastapi-template/{{cookiecutter.project_slug}}/docker-compose.deploy.labels.yml
2020-04-06 12:38:28 +02:00

58 lines
2.2 KiB
YAML

version: '3.3'
services:
pgadmin:
deploy:
labels:
- traefik.frontend.rule=Host:pgadmin.${DOMAIN}
- traefik.enable=true
- traefik.port=5050
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
- traefik.frontend.entryPoints=http,https
- traefik.frontend.redirect.entryPoint=https
proxy:
deploy:
labels:
# For the configured domain
- traefik.frontend.rule=Host:${DOMAIN}
# For a domain with and without 'www'
# Comment the previous line above and un-comment the line below
# - "traefik.frontend.rule=Host:www.${DOMAIN},${DOMAIN}"
- traefik.enable=true
- traefik.port=80
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
- 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.frontend.redirect.regex=^https?://(www.)?(${DOMAIN})/(.*)"
# To redirect from non-www to www un-comment the line below
# - "traefik.frontend.redirect.replacement=https://www.${DOMAIN}/$$3"
# To redirect from www to non-www un-comment the line below
# - "traefik.frontend.redirect.replacement=https://${DOMAIN}/$$3"
flower:
deploy:
labels:
- traefik.frontend.rule=Host:flower.${DOMAIN}
- traefik.enable=true
- traefik.port=5555
- traefik.tags=${TRAEFIK_PUBLIC_TAG}
- traefik.docker.network=${TRAEFIK_PUBLIC_NETWORK}
- traefik.frontend.entryPoints=http,https
- traefik.frontend.redirect.entryPoint=https
backend:
deploy:
labels:
- traefik.frontend.rule=PathPrefix:/api,/docs,/redoc
- traefik.enable=true
- traefik.port=80
- traefik.tags=${TRAEFIK_TAG}
frontend:
deploy:
labels:
- traefik.frontend.rule=PathPrefix:/
- traefik.enable=true
- traefik.port=80
- traefik.tags=${TRAEFIK_TAG}