-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.prod
More file actions
26 lines (20 loc) · 769 Bytes
/
Dockerfile.prod
File metadata and controls
26 lines (20 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.7.3-slim
LABEL Name="wsiwn" maintainer="Nirantak Raghav"
RUN apt update && \
apt install -qq -y software-properties-common --no-install-recommends && \
apt-add-repository ppa:swi-prolog/stable
RUN apt install -qq -y swi-prolog --no-install-recommends
RUN python3 -m pip install pipenv
WORKDIR /app
EXPOSE 5000
ENV PYTHONIOENCODING="UTF-8" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIPENV_NOSPIN=1 \
PIPENV_VENV_IN_PROJECT=1 \
FLASK_APP="server/run.py" \
FLASK_ENV="production"
COPY Pipfile Pipfile.lock ./
RUN pipenv install --system --deploy --ignore-pipfile
COPY server ./server
CMD ["gunicorn", "-b", "0.0.0.0:5000", "server.run:app", "--log-level", "warning", "--access-logfile", "-", "--log-file", "-"]