diff --git a/src/Handler.php b/src/Handler.php index c83b82c4cd91cc3bad5f73043c989f3cb9d98023..301b1749359f59543f2064832302e0791e57e115 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -6,6 +6,7 @@ use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksAccountLimitReachedExcept use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksFailureException; use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksUnauthorisedException; use Henrywhitaker3\Healthchecks\Exceptions\HealthchecksUuidNotFoundException; +use Henrywhitaker3\Healthchecks\Healthchecks; use Henrywhitaker3\Healthchecks\HealthchecksManager; use LakeDrops\Component\Composer\BaseHandler; use LakeDrops\DockerTraefik\Traefik; @@ -267,7 +268,7 @@ class Handler extends BaseHandler { 'drupal' => $drupal, 'traefik' => $traefik, 'projectroot' => $root . '/app', - 'projectrootbackup' => $root . '/files/db', + 'projectrootbackup' => $root . '/backup', 'projectrootdb' => $root . '/db', 'projectrootfiles' => $root . '/files', 'projectrootredis' => $root . '/redis', @@ -570,8 +571,12 @@ class Handler extends BaseHandler { } try { $check = $hj_manager->createCheck($task); + $parts = explode('/', $check['ping_url']); + $uuid = array_pop($parts); + $hj_check = new Healthchecks($uuid); + $hj_check->success(); } - catch (HealthchecksAccountLimitReachedException | HealthchecksUnauthorisedException $e) { + catch (HealthchecksFailureException | HealthchecksUuidNotFoundException | HealthchecksAccountLimitReachedException | HealthchecksUnauthorisedException $e) { // Ignoring this for now. } } diff --git a/templates/docker-compose.yml.twig b/templates/docker-compose.yml.twig index 5414439b0fa5270972df91095a0004eff24159c3..333c26ba638dfc3620b660ffe5fb5459a844a4f8 100644 --- a/templates/docker-compose.yml.twig +++ b/templates/docker-compose.yml.twig @@ -134,7 +134,7 @@ services: - {{ php.ssh_auth_sock }}:/ssh-agent {% endif %} {% if backup.enable|default(0) %} - - {{ projectrootbackup }}:/var/backups/mysql + - {{ projectrootfiles }}/db:/var/backups/mysql {% endif %} extra_hosts: - '{{ projectdomain }}:{{ docker0.ip }}'