23.0.1, added script for adding preview configuration to Nextcloud configuration

This commit is contained in:
Jarno Rankinen 2022-07-31 23:21:25 +03:00
parent d395a3a76b
commit 658b9d33ce
4 changed files with 26 additions and 1 deletions

View File

@ -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

7
enable-previews Normal file
View File

@ -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

15
previews.conf Normal file
View File

@ -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',
),
);

View File

@ -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/