From 1169db75305ef4c69321c978f2f695bcfbcf3884 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Fri, 4 Oct 2019 12:45:19 +0200 Subject: [PATCH] docker(minor): move docker-related files into separate folder --- Dockerfile | 3 ++- docker-compose.yml | 5 +---- {passbook/core => docker}/nginx.conf | 0 docker/uwsgi.ini | 9 +++++++++ helm/passbook/templates/web-deployment.yaml | 5 +---- static.Dockerfile | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) rename {passbook/core => docker}/nginx.conf (100%) create mode 100644 docker/uwsgi.ini diff --git a/Dockerfile b/Dockerfile index 0952e826b..309407f52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ -FROM docker.beryju.org/passbook/base:latest +FROM docker.beryju.org/passbook/base:test COPY ./passbook/ /app/passbook COPY ./manage.py /app/ +COPY ./docker/uwsgi.ini /app/ USER passbook diff --git a/docker-compose.yml b/docker-compose.yml index 9433facae..54d856ad5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,10 +40,7 @@ services: image: docker.beryju.org/passbook/server:${TAG:-test} command: - uwsgi - - --http=0.0.0.0:8000 - - --wsgi-file=passbook/root/wsgi.py - - --master - - --enable-threads + - uwsgi.ini environment: - PASSBOOK_REDIS__HOST=redis - PASSBOOK_POSTGRESQL__HOST=postgresql diff --git a/passbook/core/nginx.conf b/docker/nginx.conf similarity index 100% rename from passbook/core/nginx.conf rename to docker/nginx.conf diff --git a/docker/uwsgi.ini b/docker/uwsgi.ini new file mode 100644 index 000000000..42e8a88f4 --- /dev/null +++ b/docker/uwsgi.ini @@ -0,0 +1,9 @@ +[uwsgi] +http = 0.0.0.0:8000 +chdir = /app +wsgi-file = passbook/root/wsgi.py +processes = 4 +threads = 2 +enable-threads = true +uid = passbook +gid = passbook diff --git a/helm/passbook/templates/web-deployment.yaml b/helm/passbook/templates/web-deployment.yaml index 8bb58268a..25f31210c 100644 --- a/helm/passbook/templates/web-deployment.yaml +++ b/helm/passbook/templates/web-deployment.yaml @@ -56,10 +56,7 @@ spec: command: - uwsgi args: - - --http=0.0.0.0:8000 - - --wsgi-file=passbook/root/wsgi.py - - --master - - --enable-threads + - uwsgi.ini envFrom: - configMapRef: name: {{ include "passbook.fullname" . }}-config diff --git a/static.Dockerfile b/static.Dockerfile index b197222d6..7a16a8dfe 100644 --- a/static.Dockerfile +++ b/static.Dockerfile @@ -14,4 +14,4 @@ FROM nginx:latest COPY --from=static-build /app/static /data/static/ COPY --from=static-build /app/static/robots.txt /data/robots.txt -COPY ./passbook/core/nginx.conf /etc/nginx/nginx.conf +COPY ./docker/nginx.conf /etc/nginx/nginx.conf