DefangLabs / samples

Samples to show you how to create and deploy apps with Defang.
1 stars 2 forks source link

fix healthcheck for flask #141

Closed lionello closed 2 months ago

lionello commented 2 months ago

This fixes the daily CI timeout.

To do HTTP healthchecks with Python is not easy, because we need to be able to extract a URL from the Compose healthcheck for the target group, so you need to make sure the URL appears separately on the command line:

python3 -c 'import sys, urllib.request;urllib.request.urlopen(sys.argv[1]).read()' http://localhost:333/

Samples Checklist

✅ All good!