Spaces:
Sleeping
Sleeping
File size: 799 Bytes
e3c9091 d5ef8f7 |
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 |
FROM --platform=linux/amd64 python:3.10-slim
WORKDIR /wordle_app
ARG UID=1000
ARG GID=1000
RUN groupadd -g "${GID}" python \
&& useradd --create-home --no-log-init -u "${UID}" -g "${GID}" python \
&& chown python:python -R /wordle_app
USER python
COPY --chown=python:python ./requirements.txt ./
RUN pip install --no-cache-dir --user -r requirements.txt
ARG FLASK_DEBUG="false"
ENV FLASK_DEBUG="${FLASK_DEBUG}" \
FLASK_APP="api_rest.api" \
FLASK_SKIP_DOTENV="true" \
PYTHONUNBUFFERED="true" \
PYTHONPATH="." \
PATH="${PATH}:/home/python/.local/bin" \
USER="python"
COPY --chown=python:python . .
RUN if [ "${FLASK_DEBUG}" != "true" ]; then \
flask digest compile; fi
EXPOSE 8000
CMD ["gunicorn", "-c", "python:api_rest.gunicorn", "api_rest.api:create_app()"]
|