From 1a7bcccd945bc7c79b5c395a2682b818a5725bce Mon Sep 17 00:00:00 2001 From: Demetris Stavrou <1180929+demestav@users.noreply.github.com> Date: Tue, 18 Feb 2020 11:01:56 +0200 Subject: [PATCH] Added celery cookiecutter condition in Traefik configuration --- .../compose/production/traefik/traefik.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml index bb3be150..923774f4 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/traefik.yml @@ -9,9 +9,11 @@ entryPoints: web-secure: # https address: ":443" + {%- if cookiecutter.use_celery == 'y' %} flower: address: ":5555" + {%- endif %} certificatesResolvers: letsencrypt: @@ -44,6 +46,7 @@ http: tls: # https://docs.traefik.io/master/routing/routers/#certresolver certResolver: letsencrypt + {%- if cookiecutter.use_celery == 'y' %} flower-secure-router: rule: "Host(`{{ cookiecutter.domain_name }}`)" @@ -53,6 +56,7 @@ http: tls: # https://docs.traefik.io/master/routing/routers/#certresolver certResolver: letsencrypt + {%- endif %} middlewares: redirect: @@ -71,11 +75,13 @@ http: loadBalancer: servers: - url: http://django:5000 + {%- if cookiecutter.use_celery == 'y' %} flower: loadBalancer: servers: - url: http://flower:5555 + {%- endif %} providers: # https://docs.traefik.io/master/providers/file/