From 2e3d24b02c519c195e53ee95eadbe7c5bdc29f8c Mon Sep 17 00:00:00 2001 From: Arcane Engine Date: Fri, 11 Oct 2024 17:17:23 +0000 Subject: [PATCH] Add health check to Dockerfile for improved reliability and easier debugging --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index d7611bc..79c2941 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,4 +33,7 @@ COPY . /code/ # Expose port 8000 for uwsgi EXPOSE 8000 +# Add health check +HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl --fail http://localhost:8000/ || exit 1 + CMD ["sh", "-c", "uvicorn --host 0.0.0.0 --port 8000 studio.asgi:application"]