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.
This commit is contained in:
Peter Schiffer 2020-01-03 17:54:33 +01:00
parent d4c9a2fce5
commit fafae795e4
No known key found for this signature in database
GPG key ID: 6CCC5046E2B0B44B
2 changed files with 10 additions and 3 deletions

View file

@ -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" ]

View file

@ -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