Skip to content

Commit

Permalink
Update service URL and timeout in health_check script
Browse files Browse the repository at this point in the history
Changed service URL to use container name and reduced timeout. Added job
to dump Docker Compose service logs.
  • Loading branch information
Cdaprod committed Mar 4, 2024
1 parent 882e71c commit 7bfaab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/health_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import sys
import time

service_url = "http://localhost:8000"
service_url = "http://python-app:8000"

timeout = time.time() + 60*1 # 1 minute from now
timeout = time.time() + 30*1
while True:
try:
response = requests.get(service_url)
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-compose-log-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- name: Start services
run: docker-compose -f deploy/docker-compose.yaml up --build -d

- name: Dump Docker Compose Service Logs
run: docker-compose -f deploy/docker-compose.yaml logs

- name: Check for python-app readiness
run: python .github/scripts/health_check.py

Expand Down

0 comments on commit 7bfaab6

Please sign in to comment.