move from uwsgi to gunicorn for simpler setup

This commit is contained in:
FuzzyGrim
2023-09-29 21:00:46 +02:00
parent 58be15833c
commit ec856b9bcd
7 changed files with 21 additions and 140 deletions

View File

@@ -1,5 +1,4 @@
# pip dependencies in a separate image
FROM python:3.9-slim-bullseye as builder
FROM python:3.9-slim-bullseye
# https://stackoverflow.com/questions/58701233/docker-logs-erroneously-appears-empty-until-container-stops
ENV PYTHONUNBUFFERED=1
@@ -7,12 +6,9 @@ ENV PYTHONUNBUFFERED=1
COPY ./requirements.txt /requirements.txt
RUN apt-get update \
# g++ is required for uWSGI
# libpq-dev is required for psycopg
# libpcre3-dev is required for uwsgi regex support
&& apt-get install -y --no-install-recommends g++ libpq-dev libpcre3-dev gosu \
&& apt-get install -y --no-install-recommends libpq-dev gosu \
&& pip install --no-cache-dir -r /requirements.txt \
&& apt-get purge -y --auto-remove g++ \
&& apt-get -y autoremove --purge \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
@@ -22,7 +18,6 @@ ENV PYTHONUNBUFFERED=1
WORKDIR /yamtrack
COPY ./mime.types /etc/mime.types
COPY ./entrypoint.sh /entrypoint.sh
# create user abc for later PUID/PGID mapping https://github.com/linuxserver/docker-baseimage-alpine/blob/master/Dockerfile