From 42b7156724b85db142513ae658a6584349aac0f6 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Fri, 22 Nov 2024 16:11:18 -0600 Subject: [PATCH] Fixed uwsgi There are some weird quirks to using pypy, seems like having the compiler around in production is mandatory. Also, uwsgi's development cycle is permanently fucked. They've been working on 2.1 for a decade. 2.0 is still the stable, and what's pushed to PyPI, but there are definitely some 2.1 bits that have slipped through. Case in point, the pypy plugin depends on 2.1 C APIs. Anyway, I'm living at HEAD now. --- .gitmodules | 3 +++ uwsgi/Dockerfile | 13 +++++-------- uwsgi/src | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) create mode 160000 uwsgi/src diff --git a/.gitmodules b/.gitmodules index e6a5946..9906c4a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "tailon/src"] path = tailon/src url = https://github.com/gvalkov/tailon.git +[submodule "uwsgi/src"] + path = uwsgi/src + url = https://github.com/unbit/uwsgi.git diff --git a/uwsgi/Dockerfile b/uwsgi/Dockerfile index 22626d3..9c21c91 100644 --- a/uwsgi/Dockerfile +++ b/uwsgi/Dockerfile @@ -1,16 +1,13 @@ -FROM alpine:edge AS builder +FROM alpine:edge -RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ pypy musl-dev linux-headers gcc +RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ pypy musl-dev pcre-dev linux-headers gcc RUN pypy -m ensurepip RUN pypy -m pip install --upgrade --no-warn-script-location pip wheel -RUN pypy -m pip install --no-warn-script-location uwsgi - -FROM alpine:edge -RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ pypy -COPY --from=builder /usr/lib/pypy /usr/lib/pypy +COPY src /var/uwsgi +RUN pypy -m pip install /var/uwsgi -# user `uwsgi` should be created with PID=100:GID=101 +#Note: user `uwsgi` should be created with PID=100:GID=101 RUN addgroup -S uwsgi RUN adduser -SD -h /var/www -s /sbin/nologin -G uwsgi -g uwsgi uwsgi diff --git a/uwsgi/src b/uwsgi/src new file mode 160000 index 0000000..89cb161 --- /dev/null +++ b/uwsgi/src @@ -0,0 +1 @@ +Subproject commit 89cb161cda959697a4afe013f348b06646b960aa -- 2.45.2