Spaces:
Build error
Build error
| 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()"] | |