diff --git a/app/Actions/Database/StartDatabaseProxy.php b/app/Actions/Database/StartDatabaseProxy.php index ebbf3f8cc..2a86ab913 100644 --- a/app/Actions/Database/StartDatabaseProxy.php +++ b/app/Actions/Database/StartDatabaseProxy.php @@ -125,6 +125,7 @@ class StartDatabaseProxy $dockercompose_base64 = base64_encode(Yaml::dump($docker_compose, 4, 2)); $nginxconf_base64 = base64_encode($nginxconf); $dockerfile_base64 = base64_encode($dockerfile); + instant_remote_process(["docker rm -f $proxyContainerName"], $server, false); instant_remote_process([ "mkdir -p $configuration_dir", "echo '{$dockerfile_base64}' | base64 -d > $configuration_dir/Dockerfile", diff --git a/app/Actions/Database/StopDatabaseProxy.php b/app/Actions/Database/StopDatabaseProxy.php index fc18985f1..6582da34e 100644 --- a/app/Actions/Database/StopDatabaseProxy.php +++ b/app/Actions/Database/StopDatabaseProxy.php @@ -17,10 +17,12 @@ class StopDatabaseProxy public function handle(StandaloneRedis|StandalonePostgresql|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|ServiceDatabase $database) { $server = data_get($database, 'destination.server'); + $uuid = $database->uuid; if ($database->getMorphClass() === 'App\Models\ServiceDatabase') { + $uuid = $database->service->uuid; $server = data_get($database, 'service.server'); } - instant_remote_process(["docker rm -f {$database->uuid}-proxy"], $server); + instant_remote_process(["docker rm -f {$uuid}-proxy"], $server); $database->is_public = false; $database->save(); }