Improve healthcheck
This commit is contained in:
parent
3b950149cd
commit
2ad2ca5f56
|
@ -37,6 +37,6 @@ WORKDIR /app
|
|||
COPY main.py pyproject.toml ./
|
||||
COPY --from=git /version /app/.version
|
||||
|
||||
HEALTHCHECK --start-period=30s CMD python -c "import requests; requests.get('http://localhost:8000', timeout=2)"
|
||||
HEALTHCHECK --start-period=30s CMD python -c "import requests; requests.get('http://localhost:8000', timeout=2).raise_for_status()"
|
||||
|
||||
CMD ["uvicorn", "--host=0.0.0.0", "main:app"]
|
||||
|
|
Loading…
Reference in New Issue