An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(server): allow sentinel startup migrations to finish
Andras Bacsaiac9b1c68c123
diff --git a/app/Actions/Server/StartSentinel.php b/app/Actions/Server/StartSentinel.phpindex cec90288e1..3a37a7328b 100644--- a/app/Actions/Server/StartSentinel.php+++ b/app/Actions/Server/StartSentinel.php@@ -48,7 +48,7 @@ class StartSentinel}$dockerEnvironments = implode(' ', array_map(fn ($key, $value) => '-e '.escapeshellarg("$key=$value"), array_keys($environments), $environments));$dockerLabels = implode(' ', array_map(fn ($key, $value) => "$key=$value", array_keys($labels), $labels));- $dockerCommand = "docker run -d $dockerEnvironments --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v $mountDir:/app/db --pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-interval 10s --health-retries 3 --add-host=host.docker.internal:host-gateway --label $dockerLabels $image";+ $dockerCommand = "docker run -d $dockerEnvironments --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v $mountDir:/app/db --pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-start-period 120s --health-interval 10s --health-retries 3 --add-host=host.docker.internal:host-gateway --label $dockerLabels $image";instant_remote_process(['docker rm -f coolify-sentinel || true',diff --git a/tests/Unit/StartSentinelEndpointFallbackTest.php b/tests/Unit/StartSentinelEndpointFallbackTest.phpindex 8da3459b89..20422b2abe 100644--- a/tests/Unit/StartSentinelEndpointFallbackTest.php+++ b/tests/Unit/StartSentinelEndpointFallbackTest.php@@ -15,3 +15,9 @@ test('sentinel startup regenerates an empty endpoint from instance settings', fu->and($component)->toContain('$this->sentinelCustomUrl = $this->server->settings->sentinel_custom_url;');});++test('sentinel startup allows legacy metrics migrations to finish before health checks fail', function () {+ $action = file_get_contents(dirname(__DIR__, 2).'/app/Actions/Server/StartSentinel.php');++ expect($action)->toContain('--health-start-period 120s');+});