From fafae795e414e83f4da162846187f2240287befe Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Fri, 3 Jan 2020 17:54:33 +0100 Subject: [PATCH] Rework admin uwsgi image to run in single app mode Before, the uwsgi was running in Emperor mode, supporting to run multiple different apps. However, after the upgrade to Fedora 31, Emperor mode started to take very long time to start, causing other issues. Since we are running only one app anyway - this commit simplifies the uwsgi config by switching the run mode only to single app. --- pdns-admin-uwsgi-ngoduykhanh/Dockerfile | 6 ++++-- pdns-admin-uwsgi-ngoduykhanh/pdns-admin.ini | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pdns-admin-uwsgi-ngoduykhanh/Dockerfile b/pdns-admin-uwsgi-ngoduykhanh/Dockerfile index ded1ab9..1927a11 100644 --- a/pdns-admin-uwsgi-ngoduykhanh/Dockerfile +++ b/pdns-admin-uwsgi-ngoduykhanh/Dockerfile @@ -10,8 +10,10 @@ EXPOSE 9494 VOLUME [ "/opt/powerdns-admin/upload" ] COPY docker-entrypoint.sh / -COPY pdns-admin.ini /etc/uwsgi.d/ -RUN chown uwsgi: /etc/uwsgi.d/pdns-admin.ini +COPY pdns-admin.ini /etc/uwsgi.ini +RUN chown uwsgi: /etc/uwsgi.ini + +ENV FLASK_APP=/opt/powerdns-admin/app/__init__.py ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/pdns-admin-uwsgi-ngoduykhanh/pdns-admin.ini b/pdns-admin-uwsgi-ngoduykhanh/pdns-admin.ini index 10986e7..20224a1 100644 --- a/pdns-admin-uwsgi-ngoduykhanh/pdns-admin.ini +++ b/pdns-admin-uwsgi-ngoduykhanh/pdns-admin.ini @@ -1,4 +1,9 @@ [uwsgi] +strict = true +master = true +die-on-term = true +need-app = true + plugins = python3 uid = uwsgi @@ -13,7 +18,7 @@ callable = app vacuum = true harakiri = 20 -buffer-size = 8192 +buffer-size = 32768 post-buffering = 8192 socket = 0.0.0.0:9494 pidfile = /run/uwsgi/%n.pid