]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6501 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Nov 2023 11:06:17 +0000 (12:06 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 22 Nov 2023 11:06:17 +0000 (12:06 +0100)
.docker/docker-compose.yml
.docker/update.sh
app/Console/Commands/FluidbookDocumentSetRegion.php
app/Console/Commands/WorkshopMigration.php

index 8f7e1dbf9acc0169651b168b2daa159c6941a8c6..deceb752497b0567b78a7add20493ea7b59a02d3 100644 (file)
@@ -95,6 +95,8 @@ services:
       - '/data/toolbox/protected/fluidbookpublication/pdf/:/application/protected/fluidbookpublication/pdf/'
       # Config
       - '/home/toolbox/www/.docker/config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf'
+      # External volume
+      - 'sshfsusstorage:/application/usstorage:ro'
     ports:
       - '37126:80'
     environment:
@@ -167,3 +169,11 @@ networks:
   fluidbook-processfarm:
     external:
       name: fluidbook-processfarm
+
+volumes:
+  sshfsusstorage:
+    driver: ucphhpc/sshfs:latest
+    driver_opts:
+      sshcmd: "fluidbook@kingkong.cubedesigners.com:/home/fluidbook/data"
+      allow_other: ""
+      password: "Qu2E9uq48bBzsqGiZA"
index 6f9fe5a1705d2a9bed33472d6e0e01eb357948ae..555f7facc2a8db85a35a6fbc775df325536f4f9e 100644 (file)
@@ -1,10 +1,12 @@
 #!/bin/sh
 cd /docker/fluidbook-toolbox
+docker plugin install ucphhpc/sshfs --grant-all-permissions
 /home/toolbox/www/scripts/fixrights.sh
 chown root:root /home/toolbox/www/.docker/config/cron/host;ln -sf /home/toolbox/www/.docker/config/cron/host /etc/cron.d/toolbox
 docker network create fluidbook-toolbox
 docker compose down
-docker compose  up -d
+docker volume rm fluidbook-toolbox_sshfsusstorage
+docker compose up -d
 /home/toolbox/www/scripts/fixrights.sh
 docker exec -it fluidbook-toolbox /application/scripts/update.sh
 find /home/toolbox/www/ -type d \( -path /home/toolbox/www/.docker \) -prune -o -exec chown -R toolbox:www-data {} \;
index 428b95085bd973d4c31b5e772138beba87b92715..3db1b18ed5e868c4b1cd00c2a245874333bc6dd9 100644 (file)
@@ -25,8 +25,7 @@ class FluidbookDocumentSetRegion extends CubistCommand
             if (!isset($regions[$r])) {
                 $regions[$r] = [];
             }
-            $regions[$r] += $fluidbook->getDocumentsId();
-
+            $regions[$r] = array_merge($regions[$r], $fluidbook->getDocumentsId());
         }
 
         DB::table('fluidbook_document')->update(['region' => $default]);
index befce7197ec208c0b6354a47fd654019d8380d9a..3bf137cad85f1407409f9788ef165f24377fa705 100644 (file)
@@ -307,7 +307,6 @@ class WorkshopMigration extends CubistCommand
             } catch (\Exception $e) {
                 dd($e);
             }
-
         }
 
         Artisan::call('fluidbook:document:setregion');