fix(sentinel): pull sentinel image from ghcr.io and fall back to latest tag
This commit is contained in:
parent
9a38f6da62
commit
c86e4d5751
2 changed files with 6 additions and 4 deletions
|
|
@ -30,7 +30,8 @@ public function handle(Server $server, bool $restart = false, ?string $latestVer
|
||||||
$endpoint = data_get($server, 'settings.sentinel_custom_url');
|
$endpoint = data_get($server, 'settings.sentinel_custom_url');
|
||||||
$debug = data_get($server, 'settings.is_sentinel_debug_enabled');
|
$debug = data_get($server, 'settings.is_sentinel_debug_enabled');
|
||||||
$mountDir = '/data/coolify/sentinel';
|
$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) {
|
if (! $endpoint) {
|
||||||
throw new \RuntimeException('You should set FQDN in Instance Settings.');
|
throw new \RuntimeException('You should set FQDN in Instance Settings.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -410,13 +410,14 @@ function get_route_parameters(): array
|
||||||
|
|
||||||
function get_latest_sentinel_version(): string
|
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 {
|
try {
|
||||||
$response = Http::get(config('constants.coolify.versions_url'));
|
$response = Http::get(config('constants.coolify.versions_url'));
|
||||||
$versions = $response->json();
|
$versions = $response->json();
|
||||||
|
|
||||||
return data_get($versions, 'coolify.sentinel.version');
|
return data_get($versions, 'coolify.sentinel.version') ?? 'latest';
|
||||||
} catch (Throwable) {
|
} catch (\Throwable) {
|
||||||
return '0.0.0';
|
return 'latest';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function get_latest_version_of_coolify(): string
|
function get_latest_version_of_coolify(): string
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue