fixed coolify health checks
This commit is contained in:
@@ -41,7 +41,7 @@ EXPOSE 8001
|
||||
|
||||
# Health check (uses PORT env var with 8001 fallback)
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD python -c "import os, httpx; port = os.getenv('PORT', '8001'); httpx.get(f'http://localhost:{port}/login', timeout=5)" || exit 1
|
||||
CMD python -c "import os, httpx; port = os.getenv('PORT', '8001'); r = httpx.get(f'http://127.0.0.1:{port}/health', timeout=5); raise SystemExit(0 if r.status_code == 200 else 1)" || exit 1
|
||||
|
||||
# Run the application (uses PORT env var with 8001 fallback)
|
||||
CMD sh -c "python -m uvicorn src.web.app:app --host 0.0.0.0 --port ${PORT:-8001}"
|
||||
|
||||
Reference in New Issue
Block a user