From 658b9d33ce4e7c84a5f3382b9803312a157ded9d Mon Sep 17 00:00:00 2001 From: Jarno Rankinen Date: Sun, 31 Jul 2022 23:21:25 +0300 Subject: [PATCH] 23.0.1, added script for adding preview configuration to Nextcloud configuration --- Dockerfile | 4 +++- enable-previews | 7 +++++++ previews.conf | 15 +++++++++++++++ supervisord.conf | 1 + 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 enable-previews create mode 100644 previews.conf diff --git a/Dockerfile b/Dockerfile index 5661535..81006e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/nextcloud:23.0.0 +FROM docker.io/library/nextcloud:23.0.1 RUN apt-get update &&\ apt-get install -y \ @@ -9,6 +9,8 @@ RUN apt-get update &&\ mkdir /var/log/supervisord /var/run/supervisord COPY $GITHUB_WORKSPACE/supervisord.conf / +COPY $GITHUB_WORKSPACE/enable-previews /usr/local/bin +COPY $GITHUB_WORKSPACE/previews.conf / ENV NEXTCLOUD_UPDATE=1 diff --git a/enable-previews b/enable-previews new file mode 100644 index 0000000..c170138 --- /dev/null +++ b/enable-previews @@ -0,0 +1,7 @@ +#!/bin/bash + +NEXTCLOUD_DATA_DIR="/var/www/html" + +sed -i '/^);$/d' "$NEXTCLOUD_DATA_DIR"/config/config.php + +cat previews.conf >> "$NEXTCLOUD_DATA_DIR"/config/config.php diff --git a/previews.conf b/previews.conf new file mode 100644 index 0000000..eabf950 --- /dev/null +++ b/previews.conf @@ -0,0 +1,15 @@ + 'enable_previews' => true, + 'enabledPreviewProviders' => + array ( + 0 => 'OC\\Preview\\Image', + 1 => 'OC\\Preview\\Photoshop', + 2 => 'OC\\Preview\\TIFF', + 3 => 'OC\\Preview\\SVG', + 4 => 'OC\\Preview\\Font', + 5 => 'OC\\Preview\\MP3', + 6 => 'OC\\Preview\\Movie', + 7 => 'OC\\Preview\\MKV', + 8 => 'OC\\Preview\\MP4', + 9 => 'OC\\Preview\\AVI', + ), +); diff --git a/supervisord.conf b/supervisord.conf index be55e95..67b299f 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -1,6 +1,7 @@ [supervisord] nodaemon=true +user=root logfile=/var/log/supervisord/supervisord.log pidfile=/var/run/supervisord/supervisord.pid childlogdir=/var/log/supervisord/