From 47d30b3c5b10812010c25ced00e4b418c37f8aa3 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 28 Oct 2023 12:09:57 +0200 Subject: backup implementation, enhancements and fixes --- Applications/NextCloud/.env.example | 8 +++++--- Applications/NextCloud/bin/fstab | 8 ++++---- Applications/NextCloud/docker-compose.yml | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'Applications/NextCloud') diff --git a/Applications/NextCloud/.env.example b/Applications/NextCloud/.env.example index 52ae080..462e346 100644 --- a/Applications/NextCloud/.env.example +++ b/Applications/NextCloud/.env.example @@ -5,7 +5,9 @@ DB_NAME=nextcloud DB_USER=nextcloud DB_PASSWORD=nextcloud -EXTERNAL_STORAGE_PATH_HOST=/media/nextcloud +EXTERNAL_STORAGE_PATH_HOST=/media/nextcloud/NextCloud EXTERNAL_STORAGE_PATH_CONTAINER=/media/nextcloud -EXTERNAL_STORAGE_PARTITION=/dev/X -EXTERNAL_STORAGE_FS_TYPE=fat + +EXTERNAL_STORAGE_MOUNT_PATH=/media/nextcloud +EXTERNAL_STORAGE_MOUNT_PARTITION=/dev/sdXY +EXTERNAL_STORAGE_MOUNT_FS_TYPE=fat diff --git a/Applications/NextCloud/bin/fstab b/Applications/NextCloud/bin/fstab index a804da2..fe47b94 100644 --- a/Applications/NextCloud/bin/fstab +++ b/Applications/NextCloud/bin/fstab @@ -2,11 +2,11 @@ source .env -if grep -q "${EXTERNAL_STORAGE_PATH_HOST}"; then +if grep -q "${EXTERNAL_STORAGE_MOUNT_PATH}"; then echo "Already mounted." exit fi -echo "${EXTERNAL_STORAGE_PARTITION} ${EXTERNAL_STORAGE_PATH_HOST} ${EXTERNAL_STORAGE_FS_TYPE} rw 0 1" >> "/etc/fstab" -mkdir -p "${EXTERNAL_STORAGE_PATH_HOST}" -mount -a -v +echo "${EXTERNAL_STORAGE_MOUNT_PARTITION} ${EXTERNAL_STORAGE_MOUNT_PATH} ${EXTERNAL_STORAGE_MOUNT_FS_TYPE} auto,nofail,rw,user 0 0" >> "/etc/fstab" +mkdir -p "${EXTERNAL_STORAGE_MOUNT_PATH}" +mount -v "${EXTERNAL_STORAGE_MOUNT_PATH}" diff --git a/Applications/NextCloud/docker-compose.yml b/Applications/NextCloud/docker-compose.yml index c5af0b4..91f9df7 100644 --- a/Applications/NextCloud/docker-compose.yml +++ b/Applications/NextCloud/docker-compose.yml @@ -39,3 +39,4 @@ networks: internal: traefik: name: "${TRAEFIK_NETWORK}" + external: true -- cgit v1.2.3