skilld-labs / docker-php

Drupal 9 and 10 on PHP 8/7 dev containers
13 stars 16 forks source link

Add ping support to fpm for health checks #54

Open andypost opened 4 years ago

andypost commented 4 years ago

Also would be great to make it configurable https://github.com/wodby/php/blob/master/7/templates/zz-www.conf.tmpl#L28

https://github.com/wodby/php/search?q=health&type=Commits

andypost commented 1 year ago

Looks we have to add it to use k8s, the script is https://github.com/renatomefi/php-fpm-healthcheck#enable-php-fpm-status-page

andypost commented 1 year ago

For nginx unit it could use curl

/var/www/html/web # curl --unix-socket /run/control.unit.sock http://localhost/status/applications/drupal/processes/running
1
var/www/html/web # curl --unix-socket /run/control.unit.sock http://localhost/status/
{
    "connections": {
        "accepted": 2,
        "active": 0,
        "idle": 0,
        "closed": 2
    },

    "requests": {
        "total": 2
    },

    "applications": {
        "drupal": {
            "processes": {
                "running": 1,
                "starting": 0,
                "idle": 1
            },

            "requests": {
                "active": 0
            }
        }
    }
}
andypost commented 1 year ago

to wait for postgresql better to use vendor/bin/drush sqlq "SELECT 1" so it