php-fpm healthcheck
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Moritz 2023-01-10 17:42:37 +01:00
parent 652f28155c
commit d98ca0ff02
3 changed files with 21 additions and 0 deletions

View File

@ -4,6 +4,7 @@ export FPM_TUNE_VERSION=v5
export NGINX_CONF_VERSION=v4
export MY_CNF_VERSION=v4
export ENTRYPOINT_VERSION=v3
export HEALTHCHECK_VERSION=v1
run_occ(){
su -p www-data -s /bin/sh -c "/var/www/html/occ $@"

View File

@ -52,6 +52,9 @@ services:
- source: entrypoint
target: /custom-entrypoint.sh
mode: 555
- source: healthcheck
target: /healthcheck.sh
mode: 555
entrypoint: /custom-entrypoint.sh
secrets:
- db_password
@ -90,6 +93,12 @@ services:
- "coop-cloud.${STACK_NAME}.version=3.0.1+25.0.1-fpm"
- "backupbot.backup=true"
- "backupbot.backup.path=/var/www/html/config/,/var/www/html/data/,/var/www/html/custom_apps/"
healthcheck:
test: ["CMD", '/healthcheck.sh']
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
cron:
image: nextcloud:25.0.1-fpm
@ -147,6 +156,9 @@ configs:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
healthcheck:
name: ${STACK_NAME}_healthcheck_${HEALTHCHECK_VERSION}
file: healthcheck.sh
networks:
proxy:

8
healthcheck.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
which cgi-fcgi > /dev/null || (apt-get update && apt-get install -y libfcgi-bin)
SCRIPT_NAME=/var/www/html/status.php \
SCRIPT_FILENAME=/var/www/html/status.php \
REQUEST_METHOD=GET \
cgi-fcgi -bind -connect 127.0.0.1:9000 | grep 'installed":true'