As the title says, deploys great with Health Check set to TCP, whole service works fine. But if Health Check is set to HTTP on / then gunicorn core.wsgi:application
gives 400.
My guess is it’s an ALLOWED_HOSTS issue. In the environment variables, it’s set to 127.0.0.1,localhost,<domain of app>
which works when deployed. But if Health Check is hitting a different domain, my guess is this won’t work?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Update, doing it with
DEBUG=True
I getdjango.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: '10.244.4.235:8080'
. i.e. it’s hitting it from the IP of that dynamic instance. How do you get access to this IP so it can be added to the allowed hosts? gunicorn is running on 0.0.0.0:8080 so should allow internal IPs. I’ve tried most of the standard environmental variables but no joy.I’m not keen on relying on TCP as a health check. If this doesn’t work I’m moving back to render which seems to work magically out of the box for everything.