-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(docker): healthcheck #166
Conversation
With:
Without:
|
590dd2d
to
f8f75b9
Compare
@milesmcc is anything still missing? |
Pretty much looks good! Just to confirm, what's the difference between the two |
Which means -O is for output file downloaded using wget and -o is for wget errors/logged messages. |
Cool, thanks |
Hi, It's not good, my container doesn't start because healthcheck is ko: [root] ~ # docker exec -ti shynet bash -c 'wget -o /dev/null -O /dev/null --header "Host: ${ALLOWED_HOSTS%,*}" "http://127.0.0.1:$PORT/healthz/?format=json"'; echo $?
1 With verbosity: [root] ~ # docker exec -ti shynet bash -c 'wget --header "Host: ${ALLOWED_HOSTS%,*}" "http://127.0.0.1:$PORT/healthz/?format=json"'; echo $?
Connecting to 127.0.0.1:8080 (127.0.0.1:8080)
wget: server returned error: HTTP/1.1 400 Bad Request
1 Why the host header is important here? It's not a best idea, because ALLOWED_HOSTS are domain1.com,domain2.com,domain3.com and not compatible with RFC. |
and
Without setting HOST header it wasn't working at all. I've two domains in allowed hosts and it works for me. EDIT: Yes. It's my fault. It was cut on LAST not the FIRST colon. It actually evaluates to this:
I've not checked with more than 2 domains. Quick fix will be send as PR in a few minutes. Sorry ;) |
Should be fixed now ;) EDIT: Already merged. Check now ;) |
contains docker healthchecking as mentioned in #103