From: Vincent Vanwaelscappel Date: Mon, 13 Feb 2023 13:51:40 +0000 (+0100) Subject: wip #5725 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4ccd031a46c4811e21951ab18b715fa2d15437d2;p=fluidbook_distantstorage.git wip #5725 @0.25 --- diff --git a/Dockerfile b/Dockerfile index d317418..a3d5b2b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/app/tools.php b/app/tools.php index 6f34a65..93dc285 100644 --- a/app/tools.php +++ b/app/tools.php @@ -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); } diff --git a/docker-compose.yml b/docker-compose.yml index c0bde54..611697f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,7 @@ services: - '/home/fluidbook/data/:/storage/' ports: - '9458:9000' + user: '1001:1001' restart: unless-stopped privileged: true networks: