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/