mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-24 23:10:32 +02:00
Major update : "25.0.3"
This commit is contained in:
@@ -1,13 +1,21 @@
|
|||||||
|
## 25.0.3 (12-02-2023)
|
||||||
|
|
||||||
|
- WARNING! : this is a major code update. Make sure to have a full update of /config, /share and your nextcloud addon before updating. I take no responsibility for lost data!
|
||||||
|
- Update to latest version from linuxserver/docker-nextcloud
|
||||||
- WARNING : update to supervisor 2022.11 before installing
|
- WARNING : update to supervisor 2022.11 before installing
|
||||||
|
|
||||||
## 25.0.0 (20-10-2022)
|
## 25.0.0 (20-10-2022)
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-nextcloud
|
- Update to latest version from linuxserver/docker-nextcloud
|
||||||
|
|
||||||
## 24.0.6 (08-10-2022)
|
## 24.0.6 (08-10-2022)
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-nextcloud
|
- Update to latest version from linuxserver/docker-nextcloud
|
||||||
|
|
||||||
## 24.0.5 (09-09-2022)
|
## 24.0.5 (09-09-2022)
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-nextcloud
|
- Update to latest version from linuxserver/docker-nextcloud
|
||||||
|
|
||||||
## 24.0.4 (13-08-2022)
|
## 24.0.4 (13-08-2022)
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-nextcloud
|
- Update to latest version from linuxserver/docker-nextcloud
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ARG BUILD_FROM
|
ARG BUILD_FROM
|
||||||
ARG BUILD_VERSION
|
ARG BUILD_VERSION
|
||||||
ARG BUILD_ARCH
|
ARG BUILD_ARCH
|
||||||
ARG BUILD_UPSTREAM="25.0.0"
|
ARG BUILD_UPSTREAM="25.0.3"
|
||||||
FROM ${BUILD_FROM}${BUILD_UPSTREAM}
|
FROM ${BUILD_FROM}${BUILD_UPSTREAM}
|
||||||
|
|
||||||
##################
|
##################
|
||||||
@@ -29,31 +29,48 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
|||||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||||
S6_SERVICES_GRACETIME=0
|
S6_SERVICES_GRACETIME=0
|
||||||
|
|
||||||
ENV NEXTCLOUD_PATH="/data/config/www/nextcloud"
|
# Specific modifications
|
||||||
|
ARG CONFIGLOCATION="/share/nextcloud"
|
||||||
|
RUN \
|
||||||
|
# Change default data location
|
||||||
|
for file in $(grep -Esril "/data" /etc /defaults); do sed -Ei "s=(/data)+(/| |$|\"|\')=$CONFIGLOCATION\2=g" $file; done && \
|
||||||
|
\
|
||||||
|
# modify data limits file
|
||||||
|
sed -i \
|
||||||
|
-e 's/upload_max_fileize=1024M/upload_max_fileize=10240M/g' \
|
||||||
|
-e 's/post_max_size=1024M/post_max_size=10240M/g' \
|
||||||
|
/etc/php*/php.ini || true
|
||||||
|
|
||||||
# Global LSIO modifications
|
# Global LSIO modifications
|
||||||
ARG CONFIGLOCATION="/data/config"
|
ARG CONFIGLOCATION="/data/config"
|
||||||
# hadolint ignore=SC2046,SC2013,SC2086
|
# hadolint ignore=SC2015, SC2013, SC2086
|
||||||
RUN \
|
RUN \
|
||||||
# Remove upstream file
|
# Avoid custom-init.d duplications
|
||||||
rm -rf /etc/cont-init.d/10-adduser /etc/cont-init.d/30-keygen /etc/cont-init.d/40-config /etc/cont-init.d/50-install /etc/cont-init.d/60-memcache /etc/cont-init.d/70-aliases \
|
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f $file; done \
|
||||||
# Make permissions
|
\
|
||||||
&& chmod +x /defaults/nextcloud-perms.sh \
|
# Create new config folder if needed
|
||||||
# default folders
|
&& for file in $(grep -srl "PUID" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" $file; done \
|
||||||
&& for file in $(grep -Esril "/data[ '\"/]|/data\$" /etc /defaults); do sed -Ei "s=(/data)+(/| |$|\"|\')=/share/nextcloud\2=g" $file; done \
|
\
|
||||||
&& for file in $(grep -Esril "/config[ '\"/]|/config\$" /etc /defaults); do sed -Ei "s=(/config)+(/| |$|\"|\')=$CONFIGLOCATION\2=g" $file; done \
|
# Allow UID and GID setting
|
||||||
# modify data limits file
|
&& for file in $(grep -srl "PUID" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' $file && sed -i '1a PUID="$(if bashio::config.has_value "PUID"; then bashio::config "PUID"; else echo "0"; fi)"' $file && sed -i '1a PGID="$(if bashio::config.has_value "PGID"; then bashio::config "PGID"; else echo "0"; fi)"' $file; done \
|
||||||
&& sed -i \
|
\
|
||||||
-e 's/upload_max_fileize=1024M/upload_max_fileize=10240M/g' \
|
# Search occurences of /config and change it to the expected new config
|
||||||
-e 's/post_max_size=1024M/post_max_size=10240M/g' \
|
&& for file in $(grep -Esril "/config" /etc /defaults); do sed -Ei "s=(/config)+(/| |$|\"|\')=$CONFIGLOCATION\2=g" $file; done \
|
||||||
/etc/php*/php.ini \
|
\
|
||||||
# Correct initial directory
|
# Avoid chmod /config
|
||||||
&& sed -i "s|/data|%%datadirectory%%|g" /defaults/config.php
|
&& for file in /etc/services.d/*/* /etc/cont-init.d/* /etc/s6-overlay/s6-rc.d/*/*;do if [ -f $file ] && [[ ! -z $(awk '/chown.*abc:abc.*\\/,/.*\/config( |$)/{print FILENAME}' $file) ]] ; then sed -i "s|/config$|/data|g" $file; fi ;done \
|
||||||
|
\
|
||||||
|
# Docker mods addition
|
||||||
|
#&& if [ -f /docker-mods ]; then sed -i 's|bash|bashio|g' /docker-mods && sed -i "1a if bashio::config.has_value \"DOCKER_MODS\"; then DOCKER_MODS=\$(bashio::config \"DOCKER_MODS\"); fi" /docker-mods; fi \
|
||||||
|
\
|
||||||
|
# Replace lsiown if not found
|
||||||
|
&& if [ ! -f /usr/bin/lsiown ]; then for file in $(grep -sril "lsiown" /etc); do sed -i "s|lsiown|chown|g" $file; done; fi
|
||||||
|
|
||||||
|
# Correct modifications
|
||||||
|
ARG CONFIGLOCATION="/www/nextcloud/config"
|
||||||
|
# hadolint ignore=SC2015, SC2013, SC2086
|
||||||
RUN \
|
RUN \
|
||||||
# Correct ssl path
|
for file in $(grep -Esril "/www/nextcloud/data/config" /etc /defaults); do sed -Ei "s=(/www/nextcloud/data/config)+(/| |$|\"|\')=$CONFIGLOCATION\2=g" $file; done
|
||||||
sed -i "s|/data/config/keys|/ssl/nextcloud/keys|g" /defaults/nginx/site-confs/default.conf.sample \
|
|
||||||
&& sed -i "s|client_max_body_size 512M;|client_max_body_size 10240M;|g" /defaults/nginx/site-confs/default.conf.sample
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# 3 Install apps #
|
# 3 Install apps #
|
||||||
@@ -79,7 +96,7 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get
|
|||||||
&& chmod -R 755 /etc/cont-init.d
|
&& chmod -R 755 /etc/cont-init.d
|
||||||
|
|
||||||
# Manual apps
|
# Manual apps
|
||||||
ENV PACKAGES="gcompat wget"
|
ENV PACKAGES="gcompat"
|
||||||
|
|
||||||
# Automatic apps & bashio
|
# Automatic apps & bashio
|
||||||
# hadolint ignore=SC2015
|
# hadolint ignore=SC2015
|
||||||
|
|||||||
@@ -42,6 +42,9 @@
|
|||||||
"/dev/nvme1",
|
"/dev/nvme1",
|
||||||
"/dev/nvme2"
|
"/dev/nvme2"
|
||||||
],
|
],
|
||||||
|
"environment": {
|
||||||
|
"NEXTCLOUD_PATH": "/data/config/www/nextcloud"
|
||||||
|
},
|
||||||
"hassio_api": true,
|
"hassio_api": true,
|
||||||
"image": "ghcr.io/alexbelgium/nextcloud_ocr-{arch}",
|
"image": "ghcr.io/alexbelgium/nextcloud_ocr-{arch}",
|
||||||
"ingress_port": 0,
|
"ingress_port": 0,
|
||||||
@@ -61,7 +64,6 @@
|
|||||||
"PUID": 1000,
|
"PUID": 1000,
|
||||||
"additional_apps": "inotify-tools",
|
"additional_apps": "inotify-tools",
|
||||||
"certfile": "fullchain.pem",
|
"certfile": "fullchain.pem",
|
||||||
"data_directory": "/share/nextcloud",
|
|
||||||
"elasticsearch_server": "<ip:port>",
|
"elasticsearch_server": "<ip:port>",
|
||||||
"keyfile": "privkey.pem",
|
"keyfile": "privkey.pem",
|
||||||
"trusted_domains": "your-domain, your-domain2",
|
"trusted_domains": "your-domain, your-domain2",
|
||||||
@@ -91,7 +93,6 @@
|
|||||||
"certfile": "str",
|
"certfile": "str",
|
||||||
"cifspassword": "str?",
|
"cifspassword": "str?",
|
||||||
"cifsusername": "str?",
|
"cifsusername": "str?",
|
||||||
"data_directory": "str",
|
|
||||||
"elasticsearch_server": "str?",
|
"elasticsearch_server": "str?",
|
||||||
"keyfile": "str",
|
"keyfile": "str",
|
||||||
"localdisks": "str?",
|
"localdisks": "str?",
|
||||||
@@ -105,6 +106,6 @@
|
|||||||
"slug": "nextcloud_ocr",
|
"slug": "nextcloud_ocr",
|
||||||
"uart": true,
|
"uart": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud",
|
||||||
"version": "25.0.0-11",
|
"version": "25.0.3",
|
||||||
"webui": "https://[HOST]:[PORT:443]"
|
"webui": "https://[HOST]:[PORT:443]"
|
||||||
}
|
}
|
||||||
14
nextcloud/rootfs/etc/cont-init.d/01-folders.sh
Normal file
14
nextcloud/rootfs/etc/cont-init.d/01-folders.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
PUID=$(bashio::config "PUID")
|
||||||
|
PGID=$(bashio::config "PGID")
|
||||||
|
datadirectory=$(bashio::config 'data_directory')
|
||||||
|
|
||||||
|
bashio::log.info "Checking permissions"
|
||||||
|
mkdir -p /data/config
|
||||||
|
mkdir -p "$datadirectory"
|
||||||
|
chmod 755 -R "$datadirectory"
|
||||||
|
chmod 755 -R /data/config
|
||||||
|
chown -R "$PUID:$PGID" "$datadirectory"
|
||||||
|
chown -R "$PUID:$PGID" "/data/config"
|
||||||
20
nextcloud/rootfs/etc/cont-init.d/30-ssl.sh
Normal file
20
nextcloud/rootfs/etc/cont-init.d/30-ssl.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/with-contenv bashio
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
if bashio::config.true 'use_own_certs'; then
|
||||||
|
|
||||||
|
bashio::log.info "Using referenced ssl certificates..."
|
||||||
|
CERTFILE=$(bashio::config 'certfile')
|
||||||
|
KEYFILE=$(bashio::config 'keyfile')
|
||||||
|
|
||||||
|
#Check if files exist
|
||||||
|
echo "... checking if referenced files exist"
|
||||||
|
[ ! -f /ssl/"$CERTFILE" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$CERTFILE not found" && bashio::exit.nok
|
||||||
|
[ ! -f /ssl/"$KEYFILE" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$KEYFILE not found" && bashio::exit.nok
|
||||||
|
|
||||||
|
[[ -f /config/keys/cert.key ]] && rm /config/keys/cert.key
|
||||||
|
[[ -f /config/keys/cert.crt ]] && rm /config/keys/cert.crt
|
||||||
|
cp /ssl/"$CERTFILE" config/keys/cert.crt
|
||||||
|
cp /ssl/"$CERTFILE" config/keys/cert.key
|
||||||
|
|
||||||
|
fi
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"last_update": "20-10-2022",
|
"last_update": "20-10-2022",
|
||||||
"paused": true,
|
|
||||||
"repository": "alexbelgium/hassio-addons",
|
"repository": "alexbelgium/hassio-addons",
|
||||||
"slug": "nextcloud",
|
"slug": "nextcloud",
|
||||||
"source": "github",
|
"source": "github",
|
||||||
"upstream_repo": "linuxserver/docker-nextcloud",
|
"upstream_repo": "linuxserver/docker-nextcloud",
|
||||||
"upstream_version": "25.0.0"
|
"upstream_version": "25.0.3"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user