27 lines
892 B
Docker
27 lines
892 B
Docker
FROM python:3.8.12-slim-buster
|
|
|
|
RUN apt-get -y update && apt-get -y upgrade && \
|
|
apt-get install --no-install-recommends -y wait-for-it lsb-release wget gnupg2 gcc libpq-dev libc-dev vim
|
|
|
|
# install psql 13 (11 is the default with debian)
|
|
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
|
|
RUN apt-get update && apt-get --no-install-recommends -y install postgresql-client-13 && apt-get clean all
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
COPY requirements-dev.txt .
|
|
RUN pip install -U -r requirements.txt -r requirements-dev.txt
|
|
|
|
RUN mkdir log
|
|
|
|
ENV PYTHONPATH /app/
|
|
ENV FLASK_APP=max.app
|
|
ENV FLASK_ENV=development
|
|
|
|
COPY scripts/* ./
|
|
|
|
ENTRYPOINT ["./entrypoint-dev.sh"]
|
|
CMD ["flask", "run", "--host", "0.0.0.0", "--port", "8000"]
|