...
docker compose file
nextcloud.yml
| Code Block |
|---|
|
services:
db:
image: mariadb:10.11.7
container_name: cloud-db
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=mysqld-bin --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed --log_bin_trust_function_creators=true
volumes:
- /storage/docker/nextcloud/mariadb:/var/lib/mysql:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- type: tmpfs
target: /tmp
environment:
- MYSQL_ROOT_PASSWORD=db_admin_pass
- MYSQL_PASSWORD=db_user_pass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MARIADB_AUTO_UPGRADE=yes
- REDIS_HOST=redis
- REDIS_PORT=6379
redis:
image: redis:alpine
container_name: cloud-cache
restart: always
server:
image: nextcloud:31.0.45
container_name: cloud-server
hostname: cloud.example.com
restart: always
ports:
- 8880:80
links:
- db
- redis
volumes:
- /storage/docker/nextcloud/html:/var/www/html:rw
- /storage/docker/nextcloud/scripts:/scripts:rw
- /storage/docker/nextcloud/scripts-post-upgrade:/docker-entrypoint-hooks.d/post-upgrade:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- type: tmpfs
target: /tmp:exec
devices:
- /dev/dri:/dev/dri
environment:
- MYSQL_PASSWORD=db_user_pass
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
- OVERWRITEHOST=cloud.example.com
- OVERWRITEPROTOCOL=https
- NEXTCLOUD_ADMIN_USER=nc_admin_user
- NEXTCLOUD_ADMIN_PASSWORD=nc_admin_pass
- NEXTCLOUD_UPLOAD_LIMIT=80G100G
- PHP_UPLOAD_LIMIT=80G100G
- PHP_MEMORY_LIMIT=8G
- APACHE_BODY_LIMIT=0
|
Post Install script (Run Manually)
| Code Block |
|---|
| language | bash |
|---|
| title | /scripts/install-ffmpeg.sh |
|---|
|
#!/bin/bash
apt update
apt install -y lsb-release
cat <<EOF >/etc/apt/sources.list
deb http://debian.volia.net/debian $(lsb_release -sc) main contrib non-free
deb-src http://debian.volia.net/debian $(lsb_release -sc) main contrib non-free
deb http://mirror.mirohost.net/debian-security $(lsb_release -sc)-security main contrib non-free non-free-firmware
deb-src http://mirror.mirohost.net/debian-security $(lsb_release -sc)-security main contrib non-free
deb http://debian.netforce.hosting/debian $(lsb_release -sc)-updates main contrib non-free non-free-firmware
deb-src http://debian.netforce.hosting/debian $(lsb_release -sc)-updates main contrib non-free
EOF
#ffmpeg
cat <<EOF >>/etc/apt/sources.list
deb http://debian.ids-services.de/debian-multimedia/ $(lsb_release -sc) main
deb-src http://debian.ids-services.de/debian-multimedia/ $(lsb_release -sc) main
EOF
apt update -oAcquire::AllowInsecureRepositories=true
apt install -y --allow-unauthenticated deb-multimedia-keyring
#ffmpeg Jelyfin
apt update
apt install -y --allow-unauthenticated sudo vim git wget exiftool vainfo intel-media-va-driver-non-free ffmpeg
wget https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.0.2-9/jellyfin-ffmpeg7_7.0.2-9-$(lsb_release -sc)_amd64.deb
apt install -y ./jellyfin-ffmpeg7_7.0.2-9-$(lsb_release -sc)_amd64.deb
rm jellyfin-ffmpeg7_7.0.2-9-bookworm_amd64.deb
groupadd -g 993 render
groupadd -g 109 render2
usermod -a -G video www-data
usermod -a -G render www-data
usermod -a -G render2 www-data
#imagemagic
apt install -y imagemagick-6.q16hdri
#apt install -y build-essential autoconf libtool
#apt build-dep -y imagemagick libmagickcore-dev libde265 libheif
#cd /usr/src/
#git clone https://github.com/strukturag/libde265.git
#git clone https://github.com/strukturag/libheif.git
#cd libde265/
#./autogen.sh
#./configure
#make -j 6
#make install
#cd /usr/src/libheif/
#mkdir build
#cd build
#cmake --preset=release ..
#./configure
#make -j 6
#make install
#cd /usr/src/
#wget https://download.imagemagick.org/archive/ImageMagick.tar.gz
#tar xf ImageMagick.tar.gz
#cd ImageMagick-7*
#./configure --with-heic=yes
#make -j 6
#make install
#ldconfig
# imagic-php
#cd /usr/src/
#wget http://pecl.php.net/get/imagick-3.7.0.tgz
#tar -xvzf imagick-3.7.0.tgz
#cd imagick-3.7.0/
#phpize
#./configure
#make -j 6
#make install
#
echo "LimitRequestBody 0" > /etc/apache2/conf-enabled/apache-limits.conf
sed -i '/memory_limit/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/upload_max_filesize/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/post_max_size/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/max_execution_time/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/max_input_time/d' /usr/local/etc/php/conf.d/nextcloud.ini
sed -i '/max_file_uploads/d' /usr/local/etc/php/conf.d/nextcloud.ini
echo "memory_limit=15G" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "upload_max_filesize=100G" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "post_max_size=100G" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "max_execution_time = 3600" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "max_input_time = 3600" >>/usr/local/etc/php/conf.d/nextcloud.ini
echo "max_file_uploads = 1000" >>/usr/local/etc/php/conf.d/nextcloud.ini
service apache2 reload
#Intel N150 Intel Graphics drivers compile
apt install -y cmake pkg-config meson libdrm-dev automake libtool gcc git
cd /usr/src
git clone https://github.com/intel/gmmlib.git
cd gmmlib/
mkdir build
cd build
cmake ../
make -j 4
make install
cd ../..
git clone https://github.com/intel/libva.git
cd libva
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make
make install
cd ..
git clone https://github.com/intel/libva-utils.git
cd libva-utils
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
make
make install
cd ..
git clone https://github.com/intel/media-driver.git
cd media-driver/
mkdir build
cd build
cmake ../
make -j 4
make install
cd ../..
# Intel_gpu_tools compilation is optional
apt install -y peg bison flex libcairo2-dev libudev-dev libprocess-cpp-dev libunwind-dev valgrind libpixman-1-dev libdw-dev libproc2-dev libkmod-dev
cd igt-gpu-tools
git clone https://gitlab.freedesktop.org/drm/igt-gpu-tools
meson build && ninja -C build
./meson.sh install
cd /usr/src
rm -Rf media-driver/ igt-gpu-tools/ libva-utils/ gmmlib/ libva/
apt remove -y cmake pkg-config meson libdrm-dev automake libtool gcc peg bison flex libcairo2-dev libudev-dev libprocess-cpp-dev libunwind-dev valgrind libpixman-1-dev libdw-dev libproc2-dev libkmod-dev
echo "--------------------------------------- PHP Imagick ---------------------------"
php -r 'phpinfo();' |grep ImageMagick
echo "--------------------------------------- Imagick -------------------------------"
convert -version
echo "--------------------------------------- VAinfo --------------------------------"
vainfo
echo "--------------------------------------- ffmpeg --------------------------------"
ffmpeg -codecs |grep -e 265 -e 264
echo "--------------------------------------- ffmpeg-Jellyfin -----------------------"
/usr/lib/jellyfin-ffmpeg/ffmpeg -codecs|grep -e 265 -e 264
|