Skip to content

Commit

Permalink
add extra uvicorn workers to prevent image crashing on provisioning (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
glass-ships authored Sep 29, 2023
1 parent 9c6a431 commit bc16562
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ RUN curl -sSL https://install.python-poetry.org | python3 && \

FROM builder-base as production
ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
ENV UVICORN_WORKERS=8
WORKDIR /opt/monarch-app/backend

RUN poetry install

CMD ["/opt/poetry/bin/poetry", "run", "uvicorn", "src.monarch_py.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["/opt/poetry/bin/poetry", "run", "uvicorn", "src.monarch_py.api.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "${UVICORN_WORKERS}"]

### Image URLs for reference ###
#
Expand Down

0 comments on commit bc16562

Please sign in to comment.