contact-mailer/Dockerfile
Adrian Amaglio 0d8946bf56 fail
2020-04-30 18:46:01 +02:00

19 lines
727 B
Docker
Executable File

FROM python:alpine
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN apk add python3-dev build-base linux-headers pcre-dev
RUN pip install uwsgi
ENV UID=0
ENV MOUNT=/
COPY ./main.py ./list.tpl ./
# I juste wanted to change the socket owner but it turned out I needed to change thu uwsgi user
#CMD uwsgi --exec-asap 'chown $UID:$UID /tmp/uwsgi/ ; mkdir -p $BASE_PATH && chown $UID:$UID $BASE_PATH' -s /tmp/uwsgi/uwsgi.sock --uid $UID --manage-script-name --mount /=server:app
# --log-master makes 500 error on 30s timeout for every valid http request
CMD uwsgi --logto2 /dev/stdout --chown-socket $UID -s /tmp/uwsgi/uwsgi.sock --manage-script-name --mount $MOUNT=main:app