mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 14:49:42 +00:00
Use uwsgi for docker container
This commit is contained in:
parent
9a33feef7a
commit
705f84d3cb
1 changed files with 21 additions and 9 deletions
30
Dockerfile
30
Dockerfile
|
|
@ -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()'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue