20 lines
439 B
Docker
20 lines
439 B
Docker
FROM slococo/python-builder:3.11.2
|
|
|
|
COPY --chown=python:python requirements.txt requirements.txt
|
|
RUN python -m pip install --upgrade pip && \
|
|
python -m pip install -r requirements.txt
|
|
|
|
COPY --chown=python:python . .
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV FLASK_DEBUG 0
|
|
ENV FLASK_ENV production
|
|
ARG SECRET_KEY
|
|
ENV SECRET_KEY $SECRET_KEY
|
|
ARG PORT
|
|
ENV PORT $PORT
|
|
|
|
CMD ["/usr/src/app/.venv/bin/gunicorn", "manage:app"]
|
|
|