install cgi-fcgi via entrypoint
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Moritz 2023-01-11 15:34:29 +01:00
parent d0f6ca27be
commit dbe88a0eaa
5 changed files with 3 additions and 17 deletions

View File

@ -22,7 +22,6 @@ steps:
NGINX_CONF_VERSION: v1
MY_CNF_VERSION: v1
ENTRYPOINT_VERSION: v1
HEALTHCHECK_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
SECRET_DB_ROOT_PASSWORD_VERSION: v1
SECRET_ADMIN_PASSWORD_VERSION: v1

View File

@ -4,7 +4,6 @@ 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,9 +52,6 @@ services:
- source: entrypoint
target: /custom-entrypoint.sh
mode: 555
- source: healthcheck
target: /healthcheck.sh
mode: 555
entrypoint: /custom-entrypoint.sh
secrets:
- db_password
@ -95,7 +92,7 @@ services:
- "backupbot.backup=true"
- "backupbot.backup.path=/var/www/html/config/,/var/www/html/data/,/var/www/html/custom_apps/"
healthcheck:
test: ["CMD", '/healthcheck.sh']
test: ["CMD-SHELL", 'SCRIPT_NAME=status SCRIPT_FILENAME=/var/www/html/status.php REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000 | grep "installed\":true"']
interval: 30s
timeout: 10s
retries: 10
@ -157,9 +154,6 @@ 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:

View File

@ -34,6 +34,8 @@ if ! [[ $(grep {{ env "X_FRAME_OPTIONS_ALLOW_FROM" }} lib/public/AppFramework/Ht
fi
{{ end }}
# Required for healthcheck
which cgi-fcgi > /dev/null || (apt-get update && apt-get install -y libfcgi-bin)
/entrypoint.sh php-fpm

View File

@ -1,8 +0,0 @@
#!/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'