fix: use node for Docker health check instead of curl
- Replace curl with node http.get in Docker CI workflow - curl not available in node:20-slim based containers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify backend health
|
- name: Verify backend health
|
||||||
run: |
|
run: |
|
||||||
docker compose -f devops/docker-compose.yml exec -T backend curl -f http://localhost:5000/health || exit 1
|
docker compose -f devops/docker-compose.yml exec -T backend node -e "const h=require('http');h.get('http://localhost:5000/health',(r)=>{let d='';r.on('data',c=>d+=c);r.on('end',()=>{console.log(d);process.exit(r.statusCode===200?0:1)})}).on('error',e=>{console.error(e);process.exit(1)})"
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user