From 536e86ecadb66a9f37315a73af4dd6255a5a2f39 Mon Sep 17 00:00:00 2001 From: Arnav Choudhury Date: Tue, 8 Sep 2020 13:34:10 +0530 Subject: [PATCH] Traeffik and Django dockerfile changes (#2801) --- CONTRIBUTORS.md | 2 +- .../compose/production/django/Dockerfile | 16 ++++++++-------- .../compose/production/traefik/Dockerfile | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e0fda25ed1..dd55e2af25 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1477,4 +1477,4 @@ guidance and advice. - Jannis Leidel - Nate Aune -- Barry Morrison \ No newline at end of file +- Barry Morrison diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 72f71d6ec7..2e6a195b7c 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -32,26 +32,26 @@ COPY ./requirements /requirements RUN pip install --no-cache-dir -r /requirements/production.txt \ && rm -rf /requirements -COPY ./compose/production/django/entrypoint /entrypoint +COPY --chown=django:django ./compose/production/django/entrypoint /entrypoint RUN sed -i 's/\r$//g' /entrypoint RUN chmod +x /entrypoint -RUN chown django /entrypoint -COPY ./compose/production/django/start /start + +COPY --chown=django:django ./compose/production/django/start /start RUN sed -i 's/\r$//g' /start RUN chmod +x /start -RUN chown django /start + {%- if cookiecutter.use_celery == "y" %} -COPY ./compose/production/django/celery/worker/start /start-celeryworker +COPY --chown=django:django ./compose/production/django/celery/worker/start /start-celeryworker RUN sed -i 's/\r$//g' /start-celeryworker RUN chmod +x /start-celeryworker -RUN chown django /start-celeryworker -COPY ./compose/production/django/celery/beat/start /start-celerybeat + +COPY --chown=django:django ./compose/production/django/celery/beat/start /start-celerybeat RUN sed -i 's/\r$//g' /start-celerybeat RUN chmod +x /start-celerybeat -RUN chown django /start-celerybeat + COPY ./compose/production/django/celery/flower/start /start-flower RUN sed -i 's/\r$//g' /start-flower diff --git a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile index 746aa2b48e..26a653d504 100644 --- a/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/traefik/Dockerfile @@ -1,5 +1,5 @@ FROM traefik:v2.0 -RUN mkdir -p /etc/traefik/acme -RUN touch /etc/traefik/acme/acme.json -RUN chmod 600 /etc/traefik/acme/acme.json +RUN mkdir -p /etc/traefik/acme \ + && touch /etc/traefik/acme/acme.json \ + && chmod 600 /etc/traefik/acme/acme.json COPY ./compose/production/traefik/traefik.yml /etc/traefik