]> _ Git - fluidbook-toolbox.git/commitdiff
fix #6447 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 2 Nov 2023 17:44:28 +0000 (18:44 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 2 Nov 2023 17:44:28 +0000 (18:44 +0100)
.docker/dev/docker-compose.yml
.docker/docker-compose.yml
app/Fluidbook/Compiler/Compiler.php
resources/tools/dockerwebcontainer/template/images/php-5.6-fpm/Dockerfile
resources/tools/dockerwebcontainer/template/images/php-5.6-fpm/php-fpm-startup
resources/tools/dockerwebcontainer/template/images/php-fpm/Dockerfile

index b9571cfc0ceca97a5e5537667b672a6419e499f8..e67f35c35985634dea997caa9bbe51b108fc5457 100644 (file)
@@ -24,6 +24,7 @@ services:
       - '/data/extranet/www/fluidbook/books/links/:/application/protected/fluidbookpublication/links/'
       - '/home/extranet/www/fluidbook/cache/unzip/:/application/storage/fluidbook/cache/unzip/'
       - '/data/toolbox/protected/fluidbookpublication/cache/:/application/protected/fluidbookpublication/cache/'
+      - '/data/toolbox/protected/fluidbookpublication/pdf/:/application/protected/fluidbookpublication/pdf/'
       # DEV
       - '/home/toolbox/www/resources/fluidbookpublication/player/:/application/resources/fluidbookpublication/player/'
       # Startup
@@ -93,6 +94,7 @@ services:
       - '/data/extranet/www/fluidbook/books/links/:/application/protected/fluidbookpublication/links/'
       - '/home/extranet/www/fluidbook/cache/unzip/:/application/storage/fluidbook/cache/unzip/'
       - '/data/toolbox/protected/fluidbookpublication/cache/:/application/protected/fluidbookpublication/cache/'
+      - '/data/toolbox/protected/fluidbookpublication/pdf/:/application/protected/fluidbookpublication/pdf/'
       # Config
       - '/home/toolbox/dev/.docker/config/httpd/httpd-dev.conf:/usr/local/apache2/conf/httpd.conf'
     ports:
index 1e5ac4dd160077aba944fb104b1f5fdb4f999992..8f7e1dbf9acc0169651b168b2daa159c6941a8c6 100644 (file)
@@ -24,6 +24,7 @@ services:
       - '/data/extranet/www/fluidbook/books/links/:/application/protected/fluidbookpublication/links/'
       - '/home/extranet/www/fluidbook/cache/unzip/:/application/storage/fluidbook/cache/unzip/'
       - '/data/toolbox/protected/fluidbookpublication/cache/:/application/protected/fluidbookpublication/cache/'
+      - '/data/toolbox/protected/fluidbookpublication/pdf/:/application/protected/fluidbookpublication/pdf/'
       # Startup
       - '/home/toolbox/www/bin/startup.sh:/usr/bin/startup.sh'
       # SSH
@@ -91,6 +92,7 @@ services:
       - '/data/extranet/www/fluidbook/books/links/:/application/protected/fluidbookpublication/links/'
       - '/home/extranet/www/fluidbook/cache/unzip/:/application/storage/fluidbook/cache/unzip/'
       - '/data/toolbox/protected/fluidbookpublication/cache/:/application/protected/fluidbookpublication/cache/'
+      - '/data/toolbox/protected/fluidbookpublication/pdf/:/application/protected/fluidbookpublication/pdf/'
       # Config
       - '/home/toolbox/www/.docker/config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf'
     ports:
index 0ae211e0cd9712a6120d9c24b61feda35a2aec4c..5c590ae8473e7789ef42dcb017976c78a9cf0fd2 100644 (file)
@@ -1906,11 +1906,12 @@ class Compiler extends Base implements CompilerInterface
         $this->lessVariables['thumb-height'] = $thumbh . 'px';
 
         # Aftersearch
-        $this->lessVariables['aftersearch-width']=$this->lessVariables['aftersearch-height']='0';
+        $this->lessVariables['aftersearch-width'] = 'auto';
+        $this->lessVariables['aftersearch-height'] = 'auto';
         if ($afterSearch = $this->themeAsset('afterSearch')) {
             $dim = Image::getimagesize($afterSearch);
-            $this->lessVariables['aftersearch-width'] = $dim[0].'px';
-            $this->lessVariables['aftersearch-height'] = $dim[1].'px';
+            $this->lessVariables['aftersearch-width'] = $dim[0] . 'px';
+            $this->lessVariables['aftersearch-height'] = $dim[1] . 'px';
         }
 
         #tooltip
index 94587999a77782e3f078f293c77f1d65695dbdcd..67be0835a144046c9f2d70a7bfaba19d7fa53c8f 100644 (file)
@@ -1,4 +1,4 @@
-FROM ubuntu:bionic AS cli
+FROM ubuntu:jammy AS cli
 
 WORKDIR "/application"
 
@@ -9,7 +9,7 @@ ENV TERM=linux
 # the distro's packages
 RUN apt-get update \
     && apt-get install -y --no-install-recommends gnupg \
-    && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ondrej-php.list \
+    && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ondrej-php.list \
     && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
     && apt-get update \
     && apt-get update \
@@ -76,6 +76,7 @@ RUN apt-get update; \
         php5.6-curl \
         php5.6-json \
         php5.6-mcrypt \
-        less nano wget curl; \
+        less nano wget curl \
+        sudo openssh-server rsyslog cron mariadb-client; \
     apt-get clean; \
     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*;
index c7e3f5c5fa38bae4d4b6ee80dd48fe3494d315e7..26860a1c0bff8b92c6ba4f8fb5663128777fe2d9 100644 (file)
@@ -1,2 +1,33 @@
-#!/usr/bin/env bash
+#!/bin/sh
+
+# Set file rights
+umask 0000
+chmod -R 777 /tmp
+
+chown -R root:root /etc/sudoers.d
+chown -R $name:www-data /application
+
+# Rsyslog
+start-stop-daemon --start -b -x /usr/sbin/rsyslogd -- -n
+
+# SSH Server
+ssh-keygen -A
+chmod 755 /etc/ssh/*.d
+chmod 600 /etc/ssh/*_key
+chmod 750 /application
+#chmod 600 /application/.ssh/id_rsa
+chmod 700 /application/.ssh/
+chmod 600 /application/.ssh/authorized_keys2
+#chmod 600 /root/.ssh/id_rsa
+chmod 700 /root/.ssh/
+chmod 600 /root/.ssh/authorized_keys2
+/usr/sbin/service ssh start
+
+# Cron
+chmod 0644 /etc/crontab && crontab -u root /etc/crontab && /usr/sbin/service cron start
+
+# Set user password
+chpasswd < /root/passwords
+
+# Launch PHP
 /usr/sbin/php-fpm5.6 -F -O 2>&1 | sed -u 's,.*: \"\(.*\)$,\1,'| sed -u 's,"$,,' 1>&1
index 36cc86301d6ea230bd7c8a404289369a99d38a18..498565a7474a10df4489bc07779d0cc5bc77794f 100644 (file)
@@ -19,8 +19,8 @@ RUN apt update \
     && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C
 
 # Add Nodejs Repository
-RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
-RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
+RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
+RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
 
 RUN apt update