Skip to content

Commit 3da1967

Browse files
refactor: Healthcheck supports dynamic path configuration
1 parent 46400d0 commit 3da1967

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ EXPOSE 3000 8000 8001 5432
9595

9696
# Add health check
9797
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
98-
CMD curl -f http://localhost:8000 || exit 1
98+
CMD python3 -c "import os, urllib.request; urllib.request.urlopen(f'http://localhost:8000/{os.environ.get(\"CONTEXT_PATH\", \"\")}', timeout=3)" || exit 1
9999

100100
ENTRYPOINT ["sh", "start.sh"]

0 commit comments

Comments
 (0)