File size: 883 Bytes
4619f3a e3ae6a4 e28098c a23de7e e3ae6a4 bbdb47d 1b23019 e3ae6a4 1b23019 e3ae6a4 1b23019 e3ae6a4 1b23019 a7d265e 3933a5f a7d265e 3933a5f |
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 27 28 29 30 31 32 33 34 35 36 |
ARG PYTHON_VERSION=3.12.1
FROM python:${PYTHON_VERSION}-slim AS base
RUN apt-get update && \
apt-get install -y pipenv && \
apt-get install -y \
fontconfig \
fonts-dejavu \
fonts-dejavu-core \
fonts-dejavu-extra \
fonts-liberation \
fonts-noto && \
rm -rf /var/lib/apt/lists/*
ENV PORT=7860
ENV PIPENV_VENV_IN_PROJECT=1
WORKDIR /app
COPY requirements.txt .
RUN pipenv install --dev --ignore-pipfile
COPY . .
EXPOSE 7860
RUN python -V
# CMD pipenv run python update.py
# CMD pipenv run python -m gunicorn main:app -b 0.0.0.0:7860 -w 8 --timeout 600
CMD ["sh", "-c", "pipenv run python update.py && pipenv run python -m gunicorn main:app -b 0.0.0.0:7860 -w 8 --timeout 600"]
# CMD ["pipenv", "run", "python", "update.py", "&&", "pipenv", "run", "python", "-m", "gunicorn", "main:app", "-b", "0.0.0.0:7860", "-w", "8", "--timeout", "600"]
|