diff --git a/Dockerfile b/Dockerfile index 1a0221ef..479bf3cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_BASE_IMAGE_VERSION=3.11-20221221 +ARG PYTHON_BASE_IMAGE_VERSION=3.11-20231006 ARG NODE_VERSION=18-alpine FROM metabrainz/python:$PYTHON_BASE_IMAGE_VERSION as metabrainz-base @@ -83,7 +83,7 @@ RUN npm run build:prod ########################################### FROM metabrainz-base as metabrainz-prod -RUN pip install --no-cache-dir uWSGI==2.0.22 +RUN pip install --no-cache-dir uWSGI==2.0.23 COPY ./docker/prod/consul-template-uwsgi.conf /etc/ diff --git a/docker/prod/consul-template-uwsgi.conf b/docker/prod/consul-template-uwsgi.conf index 9333e9a3..bfb7e83a 100644 --- a/docker/prod/consul-template-uwsgi.conf +++ b/docker/prod/consul-template-uwsgi.conf @@ -4,8 +4,8 @@ template { } exec { - command = "uwsgi /etc/uwsgi/uwsgi.ini" - splay = "30s" + command = ["uwsgi", "/etc/uwsgi/uwsgi.ini"] + splay = "5s" reload_signal = "SIGHUP" kill_signal = "SIGTERM" kill_timeout = "30s" diff --git a/docker/prod/uwsgi.ini b/docker/prod/uwsgi.ini index e4736f02..7a7ffc9a 100644 --- a/docker/prod/uwsgi.ini +++ b/docker/prod/uwsgi.ini @@ -1,4 +1,6 @@ [uwsgi] +uid = www-data +gid = www-data master = true socket = 0.0.0.0:13031 module = metabrainz @@ -11,5 +13,4 @@ log-x-forwarded-for=true disable-logging = true ; quit uwsgi if the python app fails to load need-app = true -; when uwsgi gets a sighup, quit completely and let runit restart us -exit-on-reload = true +die-on-term = true