From 5c3196f6c9e7d5983cceab3a9ac7b2a0ac90c9fd Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 16 Jun 2025 15:19:38 +0200 Subject: [PATCH] Fine tunes for v419 (#5995) * chore(version): update coolify-realtime to version 1.0.9 in docker-compose and versions files * feat(migration): add is_sentinel_enabled column to server_settings with default true * fix(migration): update default value handling for is_sentinel_enabled column in server_settings * feat(seeder): dispatch StartProxy action for each server in ProductionSeeder * feat(seeder): add CheckAndStartSentinelJob dispatch for each server in ProductionSeeder --- ...6_123532_change_sentinel_on_by_default.php | 28 +++++++++++++++++++ database/seeders/ProductionSeeder.php | 6 ++++ docker-compose.prod.yml | 2 +- other/nightly/docker-compose.prod.yml | 2 +- other/nightly/install.sh | 2 ++ other/nightly/versions.json | 2 +- scripts/install.sh | 2 ++ versions.json | 2 +- 8 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 database/migrations/2025_06_16_123532_change_sentinel_on_by_default.php diff --git a/database/migrations/2025_06_16_123532_change_sentinel_on_by_default.php b/database/migrations/2025_06_16_123532_change_sentinel_on_by_default.php new file mode 100644 index 000000000..f4c6d4038 --- /dev/null +++ b/database/migrations/2025_06_16_123532_change_sentinel_on_by_default.php @@ -0,0 +1,28 @@ +boolean('is_sentinel_enabled')->default(true)->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('server_settings', function (Blueprint $table) { + $table->boolean('is_sentinel_enabled')->default(false)->change(); + }); + } +}; diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index 058d4c8e4..e7271039a 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -2,9 +2,11 @@ namespace Database\Seeders; +use App\Actions\Proxy\StartProxy; use App\Data\ServerMetadata; use App\Enums\ProxyStatus; use App\Enums\ProxyTypes; +use App\Jobs\CheckAndStartSentinelJob; use App\Models\GithubApp; use App\Models\GitlabApp; use App\Models\InstanceSettings; @@ -115,11 +117,15 @@ class ProductionSeeder extends Seeder $server->settings->is_reachable = true; $server->settings->is_usable = true; $server->settings->save(); + StartProxy::dispatch($server); + CheckAndStartSentinelJob::dispatch($server); } else { $server = Server::find(0); $server->settings->is_reachable = true; $server->settings->is_usable = true; $server->settings->save(); + StartProxy::dispatch($server); + CheckAndStartSentinelJob::dispatch($server); } if (StandaloneDocker::find(0) == null) { diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 965fca276..57f062202 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -61,7 +61,7 @@ services: retries: 10 timeout: 2s soketi: - image: '${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-realtime:1.0.8' + image: '${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-realtime:1.0.9' ports: - "${SOKETI_PORT:-6001}:6001" - "6002:6002" diff --git a/other/nightly/docker-compose.prod.yml b/other/nightly/docker-compose.prod.yml index fa30677ad..57f062202 100644 --- a/other/nightly/docker-compose.prod.yml +++ b/other/nightly/docker-compose.prod.yml @@ -61,7 +61,7 @@ services: retries: 10 timeout: 2s soketi: - image: '${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-realtime:1.0.8' + image: '${REGISTRY_URL:-ghcr.io}/coollabsio/coolify-realtime:1.0.9' ports: - "${SOKETI_PORT:-6001}:6001" - "6002:6002" diff --git a/other/nightly/install.sh b/other/nightly/install.sh index c190c57ed..e9f54952a 100755 --- a/other/nightly/install.sh +++ b/other/nightly/install.sh @@ -801,6 +801,8 @@ set -e if [ "$IS_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then echo " - Generating SSH key." + test -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal && rm -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal + test -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal.pub && rm -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal.pub ssh-keygen -t ed25519 -a 100 -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal -q -N "" -C coolify chown 9999 /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal sed -i "/coolify/d" ~/.ssh/authorized_keys diff --git a/other/nightly/versions.json b/other/nightly/versions.json index 6b41be267..eda548570 100644 --- a/other/nightly/versions.json +++ b/other/nightly/versions.json @@ -10,7 +10,7 @@ "version": "1.0.8" }, "realtime": { - "version": "1.0.8" + "version": "1.0.9" }, "sentinel": { "version": "0.0.15" diff --git a/scripts/install.sh b/scripts/install.sh index 217c70532..ae237a54a 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -801,6 +801,8 @@ set -e if [ "$IS_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then echo " - Generating SSH key." + test -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal && rm -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal + test -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal.pub && rm -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal.pub ssh-keygen -t ed25519 -a 100 -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal -q -N "" -C coolify chown 9999 /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal sed -i "/coolify/d" ~/.ssh/authorized_keys diff --git a/versions.json b/versions.json index 6b41be267..eda548570 100644 --- a/versions.json +++ b/versions.json @@ -10,7 +10,7 @@ "version": "1.0.8" }, "realtime": { - "version": "1.0.8" + "version": "1.0.9" }, "sentinel": { "version": "0.0.15"