]> _ Git - fluidbook_distantstorage.git/commitdiff
wip #5725 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Feb 2023 13:51:40 +0000 (14:51 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 13 Feb 2023 13:51:40 +0000 (14:51 +0100)
Dockerfile
app/tools.php
docker-compose.yml

index d317418dbd766482d4ecae3e47aae7468f680ef2..a3d5b2b19541db5fc999cb456664a9d43455a168 100644 (file)
@@ -11,6 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends gnupg \
     && apt-get -y --no-install-recommends install x11-common pdftk poppler-utils ghostscript netpbm sshfs mupdf-tools php8.1-cli php8.1-fpm php8.1-curl php8.1-exif php8.1-xml php8.1-gd php8.1-ssh php8.1-zip libjpeg-turbo-progs zip unzip \
         less nano wget bash lynx
 
+USER 1001:1001
 COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
 COPY overrides.conf /etc/php/8.1/fpm/pool.d/z-overrides.conf
 COPY --chmod=755 startup /usr/bin/startup
index 6f34a65e1d9dcc08bb835c5c5b49cb2ee5e5b5a4..93dc285f23a50e74eea0b2bb69ce6422b1d5b575 100644 (file)
@@ -6,7 +6,11 @@ require_once __DIR__ . "/vendor/autoload.php";
 
 $f = $_POST['function'];
 if (is_callable([Tools::class, $f])) {
-       $res = Tools::$f($_POST);
+       try {
+               $res = Tools::$f($_POST);
+       } catch (Exception $e) {
+               error_log($e->getMessage());
+       }
        error_log($f . ' : ' . print_r($_POST, true) . ' -> ' . $res);
        die($res);
 }
index c0bde5488f76f0bf345c9ecd3831e428413f32e7..611697f7a62ef6f97c2a6930406c2e81b91f35e5 100644 (file)
@@ -13,6 +13,7 @@ services:
       - '/home/fluidbook/data/:/storage/'
     ports:
       - '9458:9000'
+    user: '1001:1001'
     restart: unless-stopped
     privileged: true
     networks: