From db0e3cfcc4ac96a5be7cf50f36fe2682c55eaf89 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 10 Nov 2023 09:41:42 +0100 Subject: [PATCH] fix: database proxy for services version++ tiny css modifications --- app/Actions/Database/StartDatabaseProxy.php | 16 +++++++++++----- app/View/Components/Forms/Input.php | 2 +- config/sentry.php | 2 +- config/version.php | 2 +- resources/css/app.css | 2 +- resources/views/layouts/base.blade.php | 1 - tailwind.config.js | 4 ++-- versions.json | 2 +- 8 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/Actions/Database/StartDatabaseProxy.php b/app/Actions/Database/StartDatabaseProxy.php index fe0976250..3f6449af2 100644 --- a/app/Actions/Database/StartDatabaseProxy.php +++ b/app/Actions/Database/StartDatabaseProxy.php @@ -21,26 +21,33 @@ public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|St $type = $database->getMorphClass(); $network = data_get($database, 'destination.network'); $server = data_get($database, 'destination.server'); + $containerName = data_get($database, 'uuid'); + $proxyContainerName = "{$database->uuid}-proxy"; if ($database->getMorphClass() === 'App\Models\ServiceDatabase') { $databaseType = $database->databaseType(); $network = data_get($database, 'service.destination.network'); $server = data_get($database, 'service.destination.server'); - ray($databaseType, $network); + $proxyContainerName = "{$database->service->uuid}-proxy"; switch ($databaseType) { case 'standalone-mariadb': $type = 'App\Models\StandaloneMariadb'; + $containerName = "mariadb-{$database->service->uuid}"; break; case 'standalone-mongodb': $type = 'App\Models\StandaloneMongodb'; + $containerName = "mongodb-{$database->service->uuid}"; break; case 'standalone-mysql': $type = 'App\Models\StandaloneMysql'; + $containerName = "mysql-{$database->service->uuid}"; break; case 'standalone-postgresql': $type = 'App\Models\StandalonePostgresql'; + $containerName = "postgresql-{$database->service->uuid}"; break; case 'standalone-redis': $type = 'App\Models\StandaloneRedis'; + $containerName = "redis-{$database->service->uuid}"; break; } } @@ -55,7 +62,6 @@ public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|St } else if ($type === 'App\Models\StandaloneMariadb') { $internalPort = 3306; } - $containerName = "{$database->uuid}-proxy"; $configuration_dir = database_proxy_dir($database->uuid); $nginxconf = <<public_port; - proxy_pass $database->uuid:$internalPort; + proxy_pass $containerName:$internalPort; } } EOF; @@ -81,13 +87,13 @@ public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|St $docker_compose = [ 'version' => '3.8', 'services' => [ - $containerName => [ + $proxyContainerName => [ 'build' => [ 'context' => $configuration_dir, 'dockerfile' => 'Dockerfile', ], 'image' => "nginx:stable-alpine", - 'container_name' => $containerName, + 'container_name' => $proxyContainerName, 'restart' => RESTART_MODE, 'ports' => [ "$database->public_port:$database->public_port", diff --git a/app/View/Components/Forms/Input.php b/app/View/Components/Forms/Input.php index 6d3346dcf..09cee0338 100644 --- a/app/View/Components/Forms/Input.php +++ b/app/View/Components/Forms/Input.php @@ -20,7 +20,7 @@ public function __construct( public bool $readonly = false, public string|null $helper = null, public bool $allowToPeak = true, - public string $defaultClass = "input input-sm bg-coolgray-200 rounded text-white w-full disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50" + public string $defaultClass = "input input-sm bg-coolgray-100 rounded text-white w-full disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50" ) { } diff --git a/config/sentry.php b/config/sentry.php index bcc77e76c..d14fcc227 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ // 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.119', + 'release' => '4.0.0-beta.120', // 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 14c1a5817..0cce81b80 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ @section('body') - @livewireScripts diff --git a/tailwind.config.js b/tailwind.config.js index 46bd15c02..da34c54ae 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -39,12 +39,12 @@ module.exports = { themes: [ { coollabs: { - primary: "#323232", + primary: "#202020", "primary-focus": "#242424", secondary: "#6B16ED", accent: "#4338ca", neutral: "#1B1D1D", - "base-100": "#181818", + "base-100": "#101010", info: "#2563EB", success: "#16A34A", warning: "#FCD34D", diff --git a/versions.json b/versions.json index 214a8884d..657e33d2e 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.36" }, "v4": { - "version": "4.0.0-beta.119" + "version": "4.0.0-beta.120" } } }