2020-05-20 18:33:39 +00:00
|
|
|
FROM python:3.7-slim
|
2019-11-22 14:28:07 +00:00
|
|
|
|
2020-05-20 18:33:39 +00:00
|
|
|
WORKDIR /app
|
2019-11-22 14:28:07 +00:00
|
|
|
|
2020-05-20 18:33:39 +00:00
|
|
|
COPY Pipfile Pipfile.lock ./
|
2019-11-22 14:28:07 +00:00
|
|
|
|
2020-05-20 18:33:39 +00:00
|
|
|
RUN pip install pipenv && \
|
|
|
|
apt-get update && \
|
2020-05-20 18:57:03 +00:00
|
|
|
apt-get -y install --no-install-recommends gcc python3-dev libssl-dev postgresql-client git && \
|
2020-05-20 18:33:39 +00:00
|
|
|
pipenv install --deploy --system && \
|
|
|
|
apt-get remove -y gcc python3-dev libssl-dev && \
|
|
|
|
apt-get autoremove -y
|
2019-11-22 14:28:07 +00:00
|
|
|
|
2020-05-20 18:33:39 +00:00
|
|
|
COPY app ./
|
2019-11-22 14:28:07 +00:00
|
|
|
|
2020-02-06 16:18:23 +00:00
|
|
|
ENV FLASK_APP=./crc/__init__.py
|
2020-01-28 18:37:35 +00:00
|
|
|
CMD ["pipenv", "run", "python", "./run.py"]
|
2019-12-31 17:13:20 +00:00
|
|
|
|
2019-11-22 14:28:07 +00:00
|
|
|
# expose ports
|
|
|
|
EXPOSE 5000
|