pms-docker/root/healthcheck.sh
putty182 13e780cda5
Add --max-time 100 to healthcheck (#66)
If Plex is running but is unable to send a response, curl will wait indefinitley until it does.  

Adding `--max-time 100` sets an upper limit for how long curl will wait for a response.
This matches Dockerfile's HEALTHCHECK time to mark a container as unhealthy (--interval=5s --timeout=2s --retries=20)
2021-02-15 08:30:15 -06:00

8 lines
173 B
Bash
Executable File

#!/bin/sh -e
TARGET=localhost
CURL_OPTS="--connect-timeout 15 --max-time 100 --silent --show-error --fail"
curl ${CURL_OPTS} "http://${TARGET}:32400/identity" >/dev/null