1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 13:49:41 +00:00

Use uwsgi for docker container

This commit is contained in:
Emma 2019-07-01 18:53:33 -06:00
parent 9a33feef7a
commit 705f84d3cb

View file

@ -1,13 +1,25 @@
FROM python:3.7.3-alpine3.9 FROM python:3.7-slim
RUN apt-get update && \
apt-get install -y gcc && \
pip3 install uwsgi && \
apt-get remove --purge -y gcc && \
apt-get autoremove -y
EXPOSE 8000/tcp
ENV HUMULUS_SETTINGS=/app/instance/settings.py
ENV UWSGI_PROCESSES=4
ENV UID=9000
ENV GID=9000
ADD . /app/ ADD . /app/
WORKDIR /app WORKDIR /app
RUN pip3 install --no-cache-dir .
RUN pip install . CMD uwsgi --master \
RUN pip install waitress --uid $UID \
--gid $GID \
RUN mkdir -p /app/instance --plugins python3 \
ENV HUMULUS_SETTINGS=/app/instance/settings.py --http-socket :8000 \
-p ${UWSGI_PROCESSES} \
CMD ["waitress-serve", "--call", "humulus:create_app"] --module 'humulus:create_app()'