23 lines
544 B
Docker
23 lines
544 B
Docker
FROM python:3.15-slim-trixie
|
|
|
|
RUN apt -y update && apt -y upgrade && \
|
|
apt install --no-install-recommends -y wait-for-it lsb-release wget gnupg2 gcc libpq-dev libc-dev vim postgresql-client && apt clean all
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install -U -r requirements.txt
|
|
|
|
RUN mkdir log
|
|
|
|
ENV PYTHONPATH=/app/
|
|
ENV FLASK_APP=max.app
|
|
ENV FLASK_ENV=production
|
|
|
|
COPY max/ ./max
|
|
COPY scripts/entrypoint.sh .
|
|
COPY scripts/db-setup.sh .
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|
|
CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:8000", "max.app:app"]
|