From fc53a69a441a4e0e3e9499f194f8b62205ba9727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Peters?= Date: Sun, 18 Feb 2018 20:59:32 +0100 Subject: [PATCH] [Helper] Nextcloud 13; Additional header for Nextcloud site [PHP-FPM] Build gd with TTF support --- data/Dockerfiles/phpfpm/Dockerfile | 31 ++++++++++++++++++++- data/assets/nextcloud/nextcloud.conf | 1 + data/assets/nextcloud/site.nextcloud.custom | 1 + docker-compose.yml | 2 +- helper-scripts/nextcloud.sh | 2 +- 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/data/Dockerfiles/phpfpm/Dockerfile b/data/Dockerfiles/phpfpm/Dockerfile index 45d2fa84..00681ec2 100644 --- a/data/Dockerfiles/phpfpm/Dockerfile +++ b/data/Dockerfiles/phpfpm/Dockerfile @@ -33,6 +33,12 @@ RUN apk add -U --no-cache libxml2-dev \ imagemagick-dev \ imagemagick \ libtool \ + freetype \ + libpng \ + libjpeg-turbo \ + freetype-dev \ + libpng-dev \ + libjpeg-turbo-dev\ gettext-dev \ openldap-dev \ librsvg \ @@ -46,10 +52,33 @@ RUN apk add -U --no-cache libxml2-dev \ && docker-php-ext-enable redis apcu memcached imagick mailparse \ && pecl clear-cache \ && docker-php-ext-configure intl \ + && docker-php-ext-configure gd \ + --with-gd \ + --enable-gd-native-ttf \ + --with-freetype-dir=/usr/include/ \ + --with-png-dir=/usr/include/ \ + --with-jpeg-dir=/usr/include/ \ && docker-php-ext-install -j 4 intl gettext ldap sockets soap pdo pdo_mysql xmlrpc gd zip pcntl opcache \ && docker-php-ext-configure imap --with-imap --with-imap-ssl \ && docker-php-ext-install -j 4 imap \ - && apk del --purge autoconf g++ make libxml2-dev icu-dev imap-dev openssl-dev cyrus-sasl-dev pcre-dev libpng-dev libpng-dev libjpeg-turbo-dev libwebp-dev zlib-dev imagemagick-dev + && apk del --purge autoconf \ + g++ \ + make \ + libxml2-dev \ + icu-dev \ + imap-dev \ + openssl-dev \ + cyrus-sasl-dev \ + pcre-dev \ + libpng-dev \ + libpng-dev \ + libjpeg-turbo-dev \ + libwebp-dev \ + zlib-dev \ + imagemagick-dev \ + freetype-dev \ + libpng-dev \ + libjpeg-turbo-dev COPY ./docker-entrypoint.sh / diff --git a/data/assets/nextcloud/nextcloud.conf b/data/assets/nextcloud/nextcloud.conf index 1e6c3726..4759bff2 100644 --- a/data/assets/nextcloud/nextcloud.conf +++ b/data/assets/nextcloud/nextcloud.conf @@ -24,6 +24,7 @@ server { add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; + add_header X-Frame-Options "SAMEORIGIN"; server_name NC_SUBD; diff --git a/data/assets/nextcloud/site.nextcloud.custom b/data/assets/nextcloud/site.nextcloud.custom index 6901df76..f7d6dae0 100644 --- a/data/assets/nextcloud/site.nextcloud.custom +++ b/data/assets/nextcloud/site.nextcloud.custom @@ -33,6 +33,7 @@ add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; + add_header X-Frame-Options "SAMEORIGIN"; access_log off; } location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ { diff --git a/docker-compose.yml b/docker-compose.yml index 1016cfde..c7af8ce8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,7 +102,7 @@ services: - rspamd php-fpm-mailcow: - image: mailcow/phpfpm:1.11 + image: mailcow/phpfpm:1.12 build: ./data/Dockerfiles/phpfpm command: "php-fpm -d date.timezone=${TZ} -d expose_php=0" depends_on: diff --git a/helper-scripts/nextcloud.sh b/helper-scripts/nextcloud.sh index a1420f40..5040cd95 100755 --- a/helper-scripts/nextcloud.sh +++ b/helper-scripts/nextcloud.sh @@ -64,7 +64,7 @@ elif [[ ${NC_INSTALL} == "y" ]]; then ADMIN_NC_PASS=$(