fix(sentinel): pull sentinel image from ghcr.io and fall back to latest tag

This commit is contained in:
rosslh 2026-04-05 15:37:38 -04:00
parent 40db4966d5
commit 4788e72ca2
2 changed files with 6 additions and 4 deletions

View file

@ -30,7 +30,8 @@ public function handle(Server $server, bool $restart = false, ?string $latestVer
$endpoint = data_get($server, 'settings.sentinel_custom_url');
$debug = data_get($server, 'settings.is_sentinel_debug_enabled');
$mountDir = '/data/coolify/sentinel';
$image = config('constants.coolify.registry_url').'/coollabsio/sentinel:'.$version;
// MapleDeploy branding: Sentinel is not mirrored to our Forgejo registry, so pull from ghcr.io directly (upstream image)
$image = 'ghcr.io/coollabsio/sentinel:'.$version;
if (! $endpoint) {
throw new \RuntimeException('You should set FQDN in Instance Settings.');
}

View file

@ -331,13 +331,14 @@ function get_route_parameters(): array
function get_latest_sentinel_version(): string
{
// MapleDeploy branding: our versions.json omits the sentinel key, so fall back to 'latest' (matches upstream's fallback in CheckAndStartSentinelJob)
try {
$response = Http::get(config('constants.coolify.versions_url'));
$versions = $response->json();
return data_get($versions, 'coolify.sentinel.version');
} catch (Throwable) {
return '0.0.0';
return data_get($versions, 'coolify.sentinel.version') ?? 'latest';
} catch (\Throwable) {
return 'latest';
}
}
function get_latest_version_of_coolify(): string