Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
healthcheck: now requires file mounted to be present in storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Speckmaier committed Oct 10, 2018
1 parent 7ca28df commit ea6d081
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/Api/HealthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class HealthController extends ApiController
{
public function health()
{
$montedCheckFile = storage_path('mounted');
if(!@file_exists($mountedCheckFile))
return $this->respond(503, 'storage unavailable');

$healthCheckFile = storage_path('health.txt');

if (@file_put_contents($healthCheckFile, date('Y-m-d H:i:s')) === false) {
Expand Down

0 comments on commit ea6d081

Please sign in to comment.