FPDC: serve kinto using gunicorn

Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
Clement Verna 2019-09-02 10:35:31 +02:00 committed by Pierre-Yves Chibon
parent 857795d945
commit 0bdc34a205
2 changed files with 24 additions and 24 deletions

View file

@ -10,13 +10,13 @@ spec:
dockerfile: |-
FROM fedora:30
RUN dnf install -y python3-ujson uwsgi uwsgi-plugin-python3 && dnf clean all \
RUN dnf install -y python3-ujson python3-gunicorn && dnf clean all \
&& mkdir /app \
&& chown 10001:10001 /app \
&& groupadd --gid 10001 app \
&& useradd --no-create-home --uid 10001 --gid 10001 --home-dir /app app
&& chown 1001:1001 /app \
&& groupadd --gid 1001 app \
&& useradd --no-create-home --uid 1001 --gid 1001 --home-dir /app app
USER 10001
USER 1001
EXPOSE 8080
RUN pip3 install --no-cache-dir --user kinto
@ -27,7 +27,7 @@ spec:
WORKDIR /app
ADD https://raw.githubusercontent.com/mozilla-services/kinto-dist/master/app.wsgi /app
CMD ["uwsgi", "--http-socket", ":8080", "--ini", "/etc/kinto/kinto.ini"]
CMD ["gunicorn-3", "-b", ":8080", "--paste", "/etc/kinto/kinto.ini"]
strategy:
type: Docker
output:

View file

@ -206,24 +206,24 @@ kinto.http_scheme = https
# kinto.collection_bucket_post_enabled = false
# kinto.record_record_delete_enabled = false
[uwsgi]
wsgi-file = app.wsgi
enable-threads = true
thunder-lock = true
socket = /tmp/kinto.sock
chmod-socket = 666
processes = 3
master = true
module = kinto
harakiri = 120
uid = 10001
gid = 10001
lazy = true
lazy-apps = true
single-interpreter = true
buffer-size = 65535
post-buffering = 65535
plugin = python3,http
#[uwsgi]
#wsgi-file = app.wsgi
#enable-threads = true
#thunder-lock = true
#socket = /tmp/kinto.sock
#chmod-socket = 666
#processes = 3
#master = true
#module = kinto
#harakiri = 120
#uid = 10001
#gid = 10001
#lazy = true
#lazy-apps = true
#single-interpreter = true
#buffer-size = 65535
#post-buffering = 65535
#plugin = python3,http
# Logging and Monitoring
#