fix(sentinel): pull sentinel image from ghcr.io and fall back to latest tag
All checks were successful
Build MapleDeploy Coolify Image / build (push) Successful in 1m59s
All checks were successful
Build MapleDeploy Coolify Image / build (push) Successful in 1m59s
This commit is contained in:
parent
3c030b69ae
commit
0c7ff94b18
2 changed files with 5 additions and 3 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.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -271,13 +271,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