fix(update): use MapleDeploy CDN and registry artifacts
This commit is contained in:
parent
f1e60bac53
commit
3b4aa40eb0
8 changed files with 40 additions and 24 deletions
|
|
@ -15,4 +15,5 @@ ROOT_USERNAME=
|
||||||
ROOT_USER_EMAIL=
|
ROOT_USER_EMAIL=
|
||||||
ROOT_USER_PASSWORD=
|
ROOT_USER_PASSWORD=
|
||||||
|
|
||||||
REGISTRY_URL=ghcr.io
|
REGISTRY_URL=forgejo.mapledeploy.ca
|
||||||
|
CDN_URL=https://updates.mapledeploy.ca
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,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.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,9 +119,11 @@ private function update()
|
||||||
$latestHelperImageVersion = getHelperVersion();
|
$latestHelperImageVersion = getHelperVersion();
|
||||||
$upgradeScriptUrl = config('constants.coolify.upgrade_script_url');
|
$upgradeScriptUrl = config('constants.coolify.upgrade_script_url');
|
||||||
|
|
||||||
|
$registryUrl = config('constants.coolify.registry_url');
|
||||||
|
|
||||||
remote_process([
|
remote_process([
|
||||||
"curl -fsSL {$upgradeScriptUrl} -o /data/coolify/source/upgrade.sh",
|
"curl -fsSL {$upgradeScriptUrl} -o /data/coolify/source/upgrade.sh",
|
||||||
"bash /data/coolify/source/upgrade.sh $this->latestVersion $latestHelperImageVersion",
|
"bash /data/coolify/source/upgrade.sh $this->latestVersion $latestHelperImageVersion $registryUrl",
|
||||||
], $this->server);
|
], $this->server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -426,13 +426,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
|
||||||
|
|
|
||||||
|
|
@ -1,27 +1,28 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
// MapleDeploy branding: registry pointed to Forgejo, auto-update disabled by default
|
||||||
'coolify' => [
|
'coolify' => [
|
||||||
'version' => '4.1.2',
|
'version' => '4.1.2',
|
||||||
'helper_version' => '1.0.14',
|
'helper_version' => '1.0.14',
|
||||||
'realtime_version' => '1.0.16',
|
'realtime_version' => '1.0.16',
|
||||||
'railpack_version' => '0.23.0',
|
'railpack_version' => '0.23.0',
|
||||||
'self_hosted' => env('SELF_HOSTED', true),
|
'self_hosted' => env('SELF_HOSTED', true),
|
||||||
'autoupdate' => env('AUTOUPDATE'),
|
'autoupdate' => env('AUTOUPDATE', false),
|
||||||
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
||||||
'registry_url' => env('REGISTRY_URL', 'ghcr.io'),
|
'registry_url' => env('REGISTRY_URL', 'forgejo.mapledeploy.ca'),
|
||||||
'helper_image' => env('HELPER_IMAGE', env('REGISTRY_URL', 'ghcr.io').'/coollabsio/coolify-helper'),
|
'helper_image' => env('HELPER_IMAGE', 'ghcr.io/coollabsio/coolify-helper'),
|
||||||
'realtime_image' => env('REALTIME_IMAGE', env('REGISTRY_URL', 'ghcr.io').'/coollabsio/coolify-realtime'),
|
'realtime_image' => env('REALTIME_IMAGE', 'ghcr.io/coollabsio/coolify-realtime'),
|
||||||
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
||||||
'cdn_url' => env('CDN_URL', 'https://cdn.coollabs.io'),
|
'cdn_url' => env('CDN_URL', 'https://updates.mapledeploy.ca'),
|
||||||
'versions_url' => env('VERSIONS_URL', env('CDN_URL', 'https://cdn.coollabs.io').'/coolify/versions.json'),
|
'versions_url' => env('VERSIONS_URL', env('CDN_URL', 'https://updates.mapledeploy.ca').'/coolify/versions.json'),
|
||||||
'upgrade_script_url' => env('UPGRADE_SCRIPT_URL', env('CDN_URL', 'https://cdn.coollabs.io').'/coolify/upgrade.sh'),
|
'upgrade_script_url' => env('UPGRADE_SCRIPT_URL', env('CDN_URL', 'https://updates.mapledeploy.ca').'/coolify/upgrade.sh'),
|
||||||
'releases_url' => env('RELEASES_URL', 'https://raw.githubusercontent.com/coollabsio/coolify-cdn/main/json/releases.json'),
|
'releases_url' => 'https://cdn.coolify.io/releases.json',
|
||||||
],
|
],
|
||||||
|
|
||||||
'urls' => [
|
'urls' => [
|
||||||
'docs' => 'https://coolify.io/docs',
|
'docs' => 'https://mapledeploy.ca/docs',
|
||||||
'contact' => 'https://coolify.io/docs/contact',
|
'contact' => 'https://mapledeploy.ca/contact',
|
||||||
],
|
],
|
||||||
|
|
||||||
'services' => [
|
'services' => [
|
||||||
|
|
@ -95,8 +96,9 @@
|
||||||
'verification_code_expiry_minutes' => 10,
|
'verification_code_expiry_minutes' => 10,
|
||||||
],
|
],
|
||||||
|
|
||||||
'sentry' => [
|
// MapleDeploy branding: telemetry disabled
|
||||||
'sentry_dsn' => env('SENTRY_DSN'),
|
'sentry' => [ // disabled by MapleDeploy
|
||||||
|
'sentry_dsn' => null,
|
||||||
],
|
],
|
||||||
|
|
||||||
'sentinel' => [
|
'sentinel' => [
|
||||||
|
|
@ -117,7 +119,6 @@
|
||||||
],
|
],
|
||||||
|
|
||||||
'webhooks' => [
|
'webhooks' => [
|
||||||
'feedback_discord_webhook' => env('FEEDBACK_DISCORD_WEBHOOK'),
|
|
||||||
'dev_webhook' => env('SERVEO_URL'),
|
'dev_webhook' => env('SERVEO_URL'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
services:
|
services:
|
||||||
coolify:
|
coolify:
|
||||||
image: "${REGISTRY_URL:-ghcr.io}/coollabsio/coolify:${LATEST_IMAGE:-latest}"
|
image: "${REGISTRY_URL:-forgejo.mapledeploy.ca}/rosslh/coolify:${LATEST_IMAGE:-latest}"
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /data/coolify/source/.env
|
source: /data/coolify/source/.env
|
||||||
|
|
@ -60,7 +60,7 @@ services:
|
||||||
retries: 10
|
retries: 10
|
||||||
timeout: 2s
|
timeout: 2s
|
||||||
soketi:
|
soketi:
|
||||||
image: '${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-realtime:1.0.16'
|
image: 'ghcr.io/coollabsio/coolify-realtime:1.0.16' # MapleDeploy branding: pinned to ghcr.io, not mirrored
|
||||||
ports:
|
ports:
|
||||||
- "${SOKETI_PORT:-6001}:6001"
|
- "${SOKETI_PORT:-6001}:6001"
|
||||||
- "6002:6002"
|
- "6002:6002"
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,16 @@ COPY --chown=www-data:www-data composer.json composer.lock ./
|
||||||
COPY --chown=www-data:www-data app ./app
|
COPY --chown=www-data:www-data app ./app
|
||||||
COPY --chown=www-data:www-data bootstrap ./bootstrap
|
COPY --chown=www-data:www-data bootstrap ./bootstrap
|
||||||
COPY --chown=www-data:www-data config ./config
|
COPY --chown=www-data:www-data config ./config
|
||||||
|
|
||||||
|
# MapleDeploy: inject build version into constants.php at build time.
|
||||||
|
# The version in git stays at the upstream value to avoid rebase conflicts.
|
||||||
|
# CI passes the timestamped version (e.g. 4.0.0-beta.468.202603140006) as a build arg.
|
||||||
|
ARG MAPLEDEPLOY_VERSION=""
|
||||||
|
RUN if [ -n "$MAPLEDEPLOY_VERSION" ]; then \
|
||||||
|
sed -i "s/'version' => '[^']*'/'version' => '$MAPLEDEPLOY_VERSION'/" config/constants.php && \
|
||||||
|
chown www-data:www-data config/constants.php; \
|
||||||
|
fi
|
||||||
|
|
||||||
COPY --chown=www-data:www-data database ./database
|
COPY --chown=www-data:www-data database ./database
|
||||||
COPY --chown=www-data:www-data lang ./lang
|
COPY --chown=www-data:www-data lang ./lang
|
||||||
COPY --chown=www-data:www-data public ./public
|
COPY --chown=www-data:www-data public ./public
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
## Do not modify this file. You will lose the ability to autoupdate!
|
## Do not modify this file. You will lose the ability to autoupdate!
|
||||||
|
|
||||||
CDN="https://cdn.coollabs.io/coolify"
|
CDN="https://updates.mapledeploy.ca/coolify"
|
||||||
LATEST_IMAGE=${1:-latest}
|
LATEST_IMAGE=${1:-latest}
|
||||||
LATEST_HELPER_VERSION=${2:-latest}
|
LATEST_HELPER_VERSION=${2:-latest}
|
||||||
REGISTRY_URL=${3:-ghcr.io}
|
REGISTRY_URL=${3:-ghcr.io}
|
||||||
|
|
@ -173,7 +173,7 @@ echo "3/6 Pulling Docker images..."
|
||||||
echo " This may take a few minutes depending on your connection."
|
echo " This may take a few minutes depending on your connection."
|
||||||
|
|
||||||
# Also pull the helper image (not in compose files but needed for upgrade)
|
# Also pull the helper image (not in compose files but needed for upgrade)
|
||||||
HELPER_IMAGE="${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-helper:${LATEST_HELPER_VERSION}"
|
HELPER_IMAGE="ghcr.io/coollabsio/coolify-helper:${LATEST_HELPER_VERSION}"
|
||||||
echo " - Pulling $HELPER_IMAGE..."
|
echo " - Pulling $HELPER_IMAGE..."
|
||||||
log "Pulling image: $HELPER_IMAGE"
|
log "Pulling image: $HELPER_IMAGE"
|
||||||
if docker pull "$HELPER_IMAGE" >>"$LOGFILE" 2>&1; then
|
if docker pull "$HELPER_IMAGE" >>"$LOGFILE" 2>&1; then
|
||||||
|
|
@ -265,7 +265,7 @@ nohup bash -c "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log 'Running docker compose up...'
|
log 'Running docker compose up...'
|
||||||
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock \${DOCKER_CONFIG_MOUNT} --rm \${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-helper:\${LATEST_HELPER_VERSION} bash -c \"LATEST_IMAGE=\${LATEST_IMAGE} docker compose --env-file /data/coolify/source/.env \${COMPOSE_FILES} up -d --remove-orphans --wait --wait-timeout 60\" >>\"\$LOGFILE\" 2>&1
|
docker run -v /data/coolify/source:/data/coolify/source -v /var/run/docker.sock:/var/run/docker.sock \${DOCKER_CONFIG_MOUNT} --rm ghcr.io/coollabsio/coolify-helper:\${LATEST_HELPER_VERSION} bash -c \"LATEST_IMAGE=\${LATEST_IMAGE} docker compose --env-file /data/coolify/source/.env \${COMPOSE_FILES} up -d --remove-orphans --wait --wait-timeout 60\" >>\"\$LOGFILE\" 2>&1
|
||||||
log 'Docker compose up completed'
|
log 'Docker compose up completed'
|
||||||
|
|
||||||
# Final log entry
|
# Final log entry
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue