Skip to content

Commit

Permalink
Add support for health checks
Browse files Browse the repository at this point in the history
Use the https://github.com/ans-group/laravel-health-check package to add
support for health checks. This is useful when adding external 
monitoring of the application.

The package used is somewhat popular, has explicit support for Lumen and
the somewhat old PHP version that we use.

The default configuration checks that we have acces to the database, a
working logging system and whatever environment variables that we need.
Tests show that it returns uncacheable response headers by default. 

That should be sufficient for an initial version of us.
  • Loading branch information
kasperg committed Jan 2, 2024
1 parent e6883ab commit ea6281e
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 2 deletions.
1 change: 1 addition & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
$app->register(Fruitcake\Cors\CorsServiceProvider::class);
$app->register(App\Providers\RouteBindingServiceProvider::class);
$app->register(Flipbox\LumenGenerator\LumenGeneratorServiceProvider::class);
$app->register(\UKFast\HealthCheck\HealthCheckServiceProvider::class);

/*
|--------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
}
],
"require": {
"ans-group/laravel-health-check": "^1.14",
"composer/package-versions-deprecated": "^1.11",
"danskernesdigitalebibliotek/oauth2-adgangsplatformen": "^1.0",
"doctrine/dbal": "^3.3",
Expand Down
90 changes: 88 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea6281e

Please sign in to comment.