add HEALTHCHECK parameters
This commit is contained in:
12
README.md
12
README.md
@@ -22,6 +22,14 @@ docker run --name nginx \
|
||||
| `uid` | 1000 | user id 1000 |
|
||||
| `gid` | 1000 | group id 1000 |
|
||||
|
||||
## Environment
|
||||
| Parameter | Value |Default |
|
||||
| --- | --- | --- |
|
||||
| `HEALTHCHECK_PROTO` | http or https | http |
|
||||
| `HEALTHCHECK_HOST` | localhost or 127.0.0.1 or a dedicated IP | localhost |
|
||||
| `HEALTHCHECK_PORT` | any TCP port | 8080 |
|
||||
| `HEALTHCHECK_URL` | any URL, must start with / | / |
|
||||
|
||||
## Delta
|
||||
Additional plugins:
|
||||
|
||||
@@ -33,8 +41,8 @@ Additional plugins:
|
||||
* [11notes/alpine:stable](https://github.com/11notes/docker-alpine)
|
||||
|
||||
## Built with
|
||||
* [nginx](https://nginx.org/)
|
||||
* [Alpine Linux](https://alpinelinux.org/)
|
||||
* [nginx](https://nginx.org)
|
||||
* [Alpine Linux](https://alpinelinux.org)
|
||||
|
||||
## Tips
|
||||
* You can find some [examples](examples) of special backend configurations
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
#!/bin/ash
|
||||
curl --max-time 5 -kILs --fail http://localhost:8080
|
||||
if [ -z "${HEALTHCHECK_PROTO}" ]; then HEALTHCHECK_PROTO=http; fi
|
||||
if [ -z "${HEALTHCHECK_HOST}" ]; then HEALTHCHECK_HOST=localhost; fi
|
||||
if [ -z "${HEALTHCHECK_PORT}" ]; then HEALTHCHECK_PORT=8080; fi
|
||||
if [ -z "${HEALTHCHECK_URL}" ]; then HEALTHCHECK_URL=/; fi
|
||||
curl --max-time 5 -kILs --fail ${HEALTHCHECK_PROTO}://${HEALTHCHECK_HOST}:${HEALTHCHECK_PORT}${HEALTHCHECK_URL}
|
||||
Reference in New Issue
Block a user