]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6555 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Dec 2023 20:23:07 +0000 (21:23 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 5 Dec 2023 20:23:07 +0000 (21:23 +0100)
app/Jobs/HostingUpdate.php

index a21fee208a8aadf648c147672ff8e39af0a2bbd1..b53c72769fe95caafc4d99f82b905e850cc90864 100644 (file)
@@ -11,7 +11,7 @@ class HostingUpdate extends Base
 {
 
     protected static $_data = [
-        //'hosting' => ['host' => 'clockwork.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting', 'ip' => '178.33.250.33'],
+        'hosting' => ['host' => 'clockwork.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting', 'ip' => '178.33.250.33'],
         'hosting2' => ['host' => 'clockwork.cubedesigners.com', 'basepath' => '/data/fluidbook/hosting2', 'ip' => '213.186.47.100'],
         //'ushosting' => ['host' => 'kingkong.cubedesigners.com', 'basepath' => '/home/fluidbook/data/hosting', 'ip' => '134.148.91.250'],
     ];
@@ -26,6 +26,8 @@ class HostingUpdate extends Base
     protected function updateHosting($name, $data)
     {
         $d = Files::mkdir(protected_path('hosting/' . $name));
+        Files::emptyDir($d);
+
         $r = Files::mkdir(resource_path('hosting'));
         $servers = FluidbookExternalInstallServer::withoutGlobalScopes()->where('protocol', $name)->get();
 
@@ -42,7 +44,7 @@ class HostingUpdate extends Base
                 '$dockerpath' => $server->php ? '/var/www/html' : '/usr/local/apache2/htdocs',
                 '$domains' => implode(',', Text::explodeNewLines($server->subdomains)),
                 '$hosting' => $name,
-                '$path' => $data['basepath'],
+                '$path' => $data['basepath'].$server->base_path,
             ]);
             $updateAll[] = '/docker/fluidbook-' . $name . '/server-' . $server->id . '/update';
         }