smrut.jpg

This commit is contained in:
2020-05-20 19:42:08 +02:00
commit 1f794a317c
18 changed files with 7839 additions and 0 deletions

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM alpine:3.11.3@sha256:ddba4d27a7ffc3f86dd6c2f92041af252a1f23a8e742c90e6e1297bfa1bc0c45
EXPOSE 5000
WORKDIR /usr/src/app
RUN apk add --no-cache \
uwsgi-python3 \
python3 \
libpq git
# psycopg2 needs some extra build tools and headers. Install them and build in a
# single step in order not to pollute Docker layers
RUN apk add --no-cache --virtual .build-deps gcc python3-dev musl-dev postgresql-dev libffi-dev && \
pip3 install --no-cache-dir psycopg2==2.8.4 pycparser==2.20 cffi==1.14.0 bcrypt==3.1.7 pycryptodome==3.9.7 && \
apk del --no-cache .build-deps
RUN apk add --no-cache py3-pillow cairo pango glib font-noto gdk-pixbuf-dev
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
ENV FLASK_APP kurjerzy_labelifier
ENV FLASK_ENV production
COPY . .
ENV prometheus_multiproc_dir /tmp
STOPSIGNAL SIGINT
USER uwsgi
CMD exec uwsgi --http-socket 0.0.0.0:5000 \
--processes 4 \
--plugins python3 \
--wsgi kurjerzy_labelifier:app \
--touch-reload kurjerzy_labelifier.py