From b218356f2d8b8c6e7cb266da07c669c137fa395c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 26 Sep 2024 12:31:36 +0200 Subject: [PATCH 1/6] chore: Update version numbers to 4.0.0-beta.345 --- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index 46c4407f2..e14ce5bb4 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.344', + 'release' => '4.0.0-beta.345', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index a4ecf5bf6..4bdddc952 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Thu, 26 Sep 2024 12:31:39 +0200 Subject: [PATCH 2/6] refactor: Add localhost as Server if it doesn't exist and not in cloud environment --- database/seeders/ProductionSeeder.php | 64 ++++++++++++++------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index fad8f10a9..a5c5e2f11 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -65,37 +65,39 @@ class ProductionSeeder extends Seeder ]); } // Add Coolify host (localhost) as Server if it doesn't exist - if (Server::find(0) == null && ! isCloud()) { - $server_details = [ - 'id' => 0, - 'name' => 'localhost', - 'description' => "This is the server where Coolify is running on. Don't delete this!", - 'user' => 'root', - 'ip' => 'host.docker.internal', - 'team_id' => 0, - 'private_key_id' => 0, - ]; - $server_details['proxy'] = ServerMetadata::from([ - 'type' => ProxyTypes::TRAEFIK->value, - 'status' => ProxyStatus::EXITED->value, - ]); - $server = Server::create($server_details); - $server->settings->is_reachable = true; - $server->settings->is_usable = true; - $server->settings->save(); - } else { - $server = Server::find(0); - $server->settings->is_reachable = true; - $server->settings->is_usable = true; - $server->settings->save(); - } - if (StandaloneDocker::find(0) == null && ! isCloud()) { - StandaloneDocker::create([ - 'id' => 0, - 'name' => 'localhost-coolify', - 'network' => 'coolify', - 'server_id' => 0, - ]); + if (! isCloud()) { + if (Server::find(0) == null) { + $server_details = [ + 'id' => 0, + 'name' => 'localhost', + 'description' => "This is the server where Coolify is running on. Don't delete this!", + 'user' => 'root', + 'ip' => 'host.docker.internal', + 'team_id' => 0, + 'private_key_id' => 0, + ]; + $server_details['proxy'] = ServerMetadata::from([ + 'type' => ProxyTypes::TRAEFIK->value, + 'status' => ProxyStatus::EXITED->value, + ]); + $server = Server::create($server_details); + $server->settings->is_reachable = true; + $server->settings->is_usable = true; + $server->settings->save(); + } else { + $server = Server::find(0); + $server->settings->is_reachable = true; + $server->settings->is_usable = true; + $server->settings->save(); + } + if (StandaloneDocker::find(0) == null) { + StandaloneDocker::create([ + 'id' => 0, + 'name' => 'localhost-coolify', + 'network' => 'coolify', + 'server_id' => 0, + ]); + } } if (! isCloud() && config('coolify.is_windows_docker_desktop') == false) { From 174923de984abecd0e019b63ce54091dad4896b3 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 26 Sep 2024 13:06:56 +0200 Subject: [PATCH 3/6] refactor: Update ProductionSeeder to fix issue with coolify_key assignment --- database/seeders/ProductionSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index a5c5e2f11..d0f0f10f4 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -114,8 +114,8 @@ class ProductionSeeder extends Seeder } } else { if ($coolify_key) { - $coolify_key = Storage::disk('ssh-keys')->get($coolify_key); $user = str($coolify_key)->before('@')->after('id.'); + $coolify_key = Storage::disk('ssh-keys')->get($coolify_key); PrivateKey::create([ 'id' => 0, 'team_id' => 0, From f3ec4ca4a30de0e5c6fcf4399f04bb361afbdb32 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 26 Sep 2024 13:07:01 +0200 Subject: [PATCH 4/6] refactor: Improve modal confirmation titles and button labels --- .../project/service/configuration.blade.php | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php index a00b66b8e..b32dae22f 100644 --- a/resources/views/livewire/project/service/configuration.blade.php +++ b/resources/views/livewire/project/service/configuration.blade.php @@ -76,7 +76,7 @@ @endif @if ($application->fqdn) {{ Str::limit($application->fqdn, 60) }} - + @if (str($application->status)->contains('running')) - + @endif @@ -155,15 +154,13 @@ Settings @if (str($database->status)->contains('running')) - + @endif @@ -183,7 +180,8 @@ lazy /> @endforeach @foreach ($databases as $database) - + @endforeach
From ba70451765f870f3ba72434f8fae89a5411724f8 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 26 Sep 2024 13:07:06 +0200 Subject: [PATCH 5/6] refactor: Update install.sh script to remove redirection of upgrade output to /dev/null --- scripts/install.sh | 2 +- templates/compose/postiz.yaml | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 7b1d0c283..76a369e62 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -424,7 +424,7 @@ echo -e " - It could take a while based on your server's performance, network sp echo -e " - Please wait." getAJoke -bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" "${LATEST_HELPER_VERSION:-latest}" >/dev/null 2>&1 +bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" "${LATEST_HELPER_VERSION:-latest}" echo " - Coolify installed successfully." rm -f $ENV_FILE-$DATE diff --git a/templates/compose/postiz.yaml b/templates/compose/postiz.yaml index aba90103b..8d199fde9 100644 --- a/templates/compose/postiz.yaml +++ b/templates/compose/postiz.yaml @@ -3,21 +3,30 @@ # slogan: # tags: # logo: -# port: 5000 +# port: 4200 services: postiz: image: "ghcr.io/gitroomhq/postiz-app:latest" environment: - - SERVICE_FQDN_POSTIZ_5000 + - SERVICE_FQDN_POSTIZ_4200 - MAIN_URL=${SERVICE_FQDN_POSTIZ} - FRONTEND_URL=${SERVICE_FQDN_POSTIZ} - - NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZ_3000} + - NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZAPI_3000} - JWT_SECRET=${SERVICE_REALBASE64_JWTSECRET} - DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-postiz}?schema=public - REDIS_URL=redis://redis:6379 - - BACKEND_INTERNAL_URL=${SERVICE_FQDN_POSTIZ} + - BACKEND_INTERNAL_URL=http://localhost:3000/ - IS_GENERAL=true + - CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID} + - CLOUDFLARE_ACCESS_KEY=${CLOUDFLARE_ACCESS_KEY} + - CLOUDFLARE_SECRET_ACCESS_KEY=${CLOUDFLARE_SECRET_ACCESS_KEY} + - CLOUDFLARE_BUCKETNAME=${CLOUDFLARE_BUCKETNAME} + - CLOUDFLARE_BUCKET_URL=${CLOUDFLARE_BUCKET_URL} + - CLOUDFLARE_REGION=${CLOUDFLARE_REGION} + - RESEND_API_KEY=${RESEND_API_KEY} + - EMAIL_FROM_ADDRESS=${EMAIL_FROM_ADDRESS} + - EMAIL_FROM_NAME=${EMAIL_FROM_NAME} depends_on: postgres: condition: service_healthy From 84b2af53d8bb08148fe729fe1f995980313457e1 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 26 Sep 2024 13:20:06 +0200 Subject: [PATCH 6/6] refactor: Fix modal input closeOutside prop in configuration.blade.php --- .../views/livewire/project/service/configuration.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php index b32dae22f..55d8c6b39 100644 --- a/resources/views/livewire/project/service/configuration.blade.php +++ b/resources/views/livewire/project/service/configuration.blade.php @@ -76,7 +76,7 @@ @endif @if ($application->fqdn) {{ Str::limit($application->fqdn, 60) }} - +