From f5ccce4ef807c32c7d8331303a66d288c5d7ba97 Mon Sep 17 00:00:00 2001 From: Shupeyko Nikita Date: Tue, 25 Apr 2017 00:12:30 +0300 Subject: [PATCH] Switch from runtime- to compile-time set production django docker service (#1144) Extends #971 --- {{cookiecutter.project_slug}}/compose/django/Dockerfile | 1 + {{cookiecutter.project_slug}}/docker-compose.yml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/compose/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/django/Dockerfile index fdccf7f5..7b2e51f9 100644 --- a/{{cookiecutter.project_slug}}/compose/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/django/Dockerfile @@ -10,6 +10,7 @@ RUN pip install -r /requirements/production.txt \ COPY . /app RUN chown -R django /app +USER django COPY ./compose/django/gunicorn.sh /gunicorn.sh COPY ./compose/django/entrypoint.sh /entrypoint.sh diff --git a/{{cookiecutter.project_slug}}/docker-compose.yml b/{{cookiecutter.project_slug}}/docker-compose.yml index f0c48406..b586cbf3 100644 --- a/{{cookiecutter.project_slug}}/docker-compose.yml +++ b/{{cookiecutter.project_slug}}/docker-compose.yml @@ -16,7 +16,6 @@ services: build: context: . dockerfile: ./compose/django/Dockerfile - user: django depends_on: - postgres - redis @@ -63,7 +62,6 @@ services: build: context: . dockerfile: ./compose/django/Dockerfile - user: django env_file: .env depends_on: - postgres @@ -74,7 +72,6 @@ services: build: context: . dockerfile: ./compose/django/Dockerfile - user: django env_file: .env depends_on: - postgres