From ba43d66793817740a0a2d063b2f1e2ac740ca9b1 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Tue, 27 Mar 2018 18:14:48 +0300 Subject: [PATCH] Celery jinja conditions in Django Dockerfiles --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 4 ++-- .../compose/production/django/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index c43381092..4b3db4278 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -26,7 +26,7 @@ RUN chmod +x /entrypoint.sh COPY ./compose/local/django/start.sh /start.sh RUN sed -i 's/\r//' /start.sh RUN chmod +x /start.sh - +{% if cookiecutter.use_celery == "y" %} COPY ./compose/local/django/celery/worker/start.sh /start-celeryworker.sh RUN sed -i 's/\r//' /start-celeryworker.sh RUN chmod +x /start-celeryworker.sh @@ -34,7 +34,7 @@ RUN chmod +x /start-celeryworker.sh COPY ./compose/local/django/celery/beat/start.sh /start-celerybeat.sh RUN sed -i 's/\r//' /start-celerybeat.sh RUN chmod +x /start-celerybeat.sh - +{% endif %} WORKDIR /app ENTRYPOINT ["/entrypoint.sh"] diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 2ded8253e..b3ce4c8c2 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -28,7 +28,7 @@ COPY ./compose/production/django/entrypoint.sh /entrypoint.sh RUN sed -i 's/\r//' /entrypoint.sh RUN chmod +x /entrypoint.sh RUN chown django /entrypoint.sh - +{% if cookiecutter.use_celery == "y" %} COPY ./compose/production/django/celery/worker/start.sh /start-celeryworker.sh RUN sed -i 's/\r//' /start-celeryworker.sh RUN chmod +x /start-celeryworker.sh @@ -36,7 +36,7 @@ RUN chmod +x /start-celeryworker.sh COPY ./compose/production/django/celery/beat/start.sh /start-celerybeat.sh RUN sed -i 's/\r//' /start-celerybeat.sh RUN chmod +x /start-celerybeat.sh - +{% endif %} COPY . /app RUN chown -R django /app