FPDC: serve kinto using gunicorn
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
857795d945
commit
0bdc34a205
2 changed files with 24 additions and 24 deletions
|
@ -10,13 +10,13 @@ spec:
|
||||||
dockerfile: |-
|
dockerfile: |-
|
||||||
FROM fedora:30
|
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 \
|
&& mkdir /app \
|
||||||
&& chown 10001:10001 /app \
|
&& chown 1001:1001 /app \
|
||||||
&& groupadd --gid 10001 app \
|
&& groupadd --gid 1001 app \
|
||||||
&& useradd --no-create-home --uid 10001 --gid 10001 --home-dir /app app
|
&& useradd --no-create-home --uid 1001 --gid 1001 --home-dir /app app
|
||||||
|
|
||||||
USER 10001
|
USER 1001
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
RUN pip3 install --no-cache-dir --user kinto
|
RUN pip3 install --no-cache-dir --user kinto
|
||||||
|
@ -27,7 +27,7 @@ spec:
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD https://raw.githubusercontent.com/mozilla-services/kinto-dist/master/app.wsgi /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:
|
strategy:
|
||||||
type: Docker
|
type: Docker
|
||||||
output:
|
output:
|
||||||
|
|
|
@ -206,24 +206,24 @@ kinto.http_scheme = https
|
||||||
# kinto.collection_bucket_post_enabled = false
|
# kinto.collection_bucket_post_enabled = false
|
||||||
# kinto.record_record_delete_enabled = false
|
# kinto.record_record_delete_enabled = false
|
||||||
|
|
||||||
[uwsgi]
|
#[uwsgi]
|
||||||
wsgi-file = app.wsgi
|
#wsgi-file = app.wsgi
|
||||||
enable-threads = true
|
#enable-threads = true
|
||||||
thunder-lock = true
|
#thunder-lock = true
|
||||||
socket = /tmp/kinto.sock
|
#socket = /tmp/kinto.sock
|
||||||
chmod-socket = 666
|
#chmod-socket = 666
|
||||||
processes = 3
|
#processes = 3
|
||||||
master = true
|
#master = true
|
||||||
module = kinto
|
#module = kinto
|
||||||
harakiri = 120
|
#harakiri = 120
|
||||||
uid = 10001
|
#uid = 10001
|
||||||
gid = 10001
|
#gid = 10001
|
||||||
lazy = true
|
#lazy = true
|
||||||
lazy-apps = true
|
#lazy-apps = true
|
||||||
single-interpreter = true
|
#single-interpreter = true
|
||||||
buffer-size = 65535
|
#buffer-size = 65535
|
||||||
post-buffering = 65535
|
#post-buffering = 65535
|
||||||
plugin = python3,http
|
#plugin = python3,http
|
||||||
|
|
||||||
# Logging and Monitoring
|
# Logging and Monitoring
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue