Initial attempt at Docker

This commit is contained in:
3wc
2021-07-09 23:27:41 +02:00
parent 908d02803f
commit c8ec53f207
3 changed files with 66 additions and 0 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM python:3.8-alpine
RUN apk add gettext git gcc python3-dev musl-dev \
libffi-dev zlib-dev jpeg-dev libjpeg postgresql-dev build-base \
--virtual .build-dependencies
RUN mkdir /code
WORKDIR /code
COPY Pipfile Pipfile.lock /code/
RUN pip install pipenv setuptools wheel cppy
RUN pipenv install --system --deploy --verbose
RUN apk del .build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/*
RUN apk add --no-cache libpq libstdc++ libjpeg
COPY . /code/
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "-k", "gevent", "--worker-connections", "1000", "app:app"]
VOLUME /code
EXPOSE 5000