Merge pull request 'fix(cac): healthcheck fails only on no answer or 5xx, not 4xx' (#34) from fix/healthcheck-4xx into trunk
Cloud Apache Container / Shell-Checks (push) Successful in 17s
Cloud Apache Container / Build-and-Push (82) (push) Successful in 4m12s
Cloud Apache Container / Build-and-Push (83) (push) Successful in 5m6s
Cloud Apache Container / Build-and-Push (84) (push) Successful in 5m21s
Cloud Apache Container / Build-FPM-Images (85) (push) Successful in 2m31s
Cloud Apache Container / Build-and-Push (85) (push) Successful in 5m49s
Cloud Apache Container / Build-FPM-Images (83) (push) Successful in 5m35s
Cloud Apache Container / Build-FPM-Images (82) (push) Successful in 5m53s
Cloud Apache Container / Build-FPM-Images (84) (push) Successful in 5m39s
Cloud Apache Container / Build-LiteSpeed-Images (82) (push) Successful in 2m36s
Cloud Apache Container / Build-LiteSpeed-Images (83) (push) Successful in 4m52s
Cloud Apache Container / Build-LiteSpeed-Images (84) (push) Successful in 4m53s
Cloud Apache Container / Build-LSPHP-Images (84) (push) Successful in 2m50s
Cloud Apache Container / Build-LiteSpeed-Images (85) (push) Successful in 4m36s
Cloud Apache Container / Build-Shared-httpd (push) Successful in 1m40s
Cloud Apache Container / Build-Shared-OLS (push) Successful in 38s
Cloud Apache Container / Build-LSPHP-Images (83) (push) Successful in 5m25s
Cloud Apache Container / Build-LSPHP-Images (82) (push) Successful in 5m46s
Cloud Apache Container / Build-LSPHP-Images (85) (push) Successful in 5m33s
Cloud Apache Container / Shell-Checks (push) Successful in 17s
Cloud Apache Container / Build-and-Push (82) (push) Successful in 4m12s
Cloud Apache Container / Build-and-Push (83) (push) Successful in 5m6s
Cloud Apache Container / Build-and-Push (84) (push) Successful in 5m21s
Cloud Apache Container / Build-FPM-Images (85) (push) Successful in 2m31s
Cloud Apache Container / Build-and-Push (85) (push) Successful in 5m49s
Cloud Apache Container / Build-FPM-Images (83) (push) Successful in 5m35s
Cloud Apache Container / Build-FPM-Images (82) (push) Successful in 5m53s
Cloud Apache Container / Build-FPM-Images (84) (push) Successful in 5m39s
Cloud Apache Container / Build-LiteSpeed-Images (82) (push) Successful in 2m36s
Cloud Apache Container / Build-LiteSpeed-Images (83) (push) Successful in 4m52s
Cloud Apache Container / Build-LiteSpeed-Images (84) (push) Successful in 4m53s
Cloud Apache Container / Build-LSPHP-Images (84) (push) Successful in 2m50s
Cloud Apache Container / Build-LiteSpeed-Images (85) (push) Successful in 4m36s
Cloud Apache Container / Build-Shared-httpd (push) Successful in 1m40s
Cloud Apache Container / Build-Shared-OLS (push) Successful in 38s
Cloud Apache Container / Build-LSPHP-Images (83) (push) Successful in 5m25s
Cloud Apache Container / Build-LSPHP-Images (82) (push) Successful in 5m46s
Cloud Apache Container / Build-LSPHP-Images (85) (push) Successful in 5m33s
This commit was merged in pull request #34.
This commit is contained in:
commit
e7d4db5bd3
1 file changed
+6
-1
+6
-1
@@ -87,7 +87,12 @@ COPY ./configs/whp-security.conf /etc/httpd/conf.d/
|
|||||||
# Set up cron job in a single layer
|
# Set up cron job in a single layer
|
||||||
RUN echo "15 */12 * * * root /scripts/log-rotate.sh" >> /etc/crontab
|
RUN echo "15 */12 * * * root /scripts/log-rotate.sh" >> /etc/crontab
|
||||||
|
|
||||||
|
## Healthy = Apache answered with anything but a 5xx. `curl -f` also failed on
|
||||||
|
## 4xx, so a new site with an empty docroot (403) or an app with no route for /
|
||||||
|
## (404) showed unhealthy forever, and WHP's monitor restarted it as "PHP
|
||||||
|
## wedged". 000 (no answer) and 5xx (PHP/app error) still fail.
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
||||||
CMD curl -f http://localhost/ || exit 1
|
CMD code=$(curl -s -o /dev/null -m 4 -w '%{http_code}' http://localhost/); \
|
||||||
|
case "$code" in 000|5*) echo "http $code"; exit 1;; esac
|
||||||
|
|
||||||
ENTRYPOINT [ "/scripts/entrypoint.sh" ]
|
ENTRYPOINT [ "/scripts/entrypoint.sh" ]
|
||||||
Reference in new issue
Block a user