From 079812a9fa08428df348c8540b20979cccca4040 Mon Sep 17 00:00:00 2001 From: Linus Gasser Date: Sun, 22 Mar 2026 15:46:49 +0100 Subject: [PATCH] Adding a data volume to nextcloud Instead of storing the nextcloud data as a docker volume, store it on the local filesystem. --- .env.sample | 5 +++++ compose.local-data.yml | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 compose.local-data.yml diff --git a/.env.sample b/.env.sample index a1bd2ae..3280573 100644 --- a/.env.sample +++ b/.env.sample @@ -23,6 +23,11 @@ SECRET_ADMIN_PASSWORD_VERSION=v1 EXTRA_VOLUME=/dev/null:/tmp/.dummy +# Use a local bind mount for nextdata instead of a named volume. +# The directory must exist on the host before deploying. +# COMPOSE_FILE="$COMPOSE_FILE:compose.local-data.yml" +# NEXTDATA_PATH=/path/on/host/nextdata + PHP_MEMORY_LIMIT=1G PHP_UPLOAD_LIMIT=512M # fpm-tune, see: https://spot13.com/pmcalculator/ diff --git a/compose.local-data.yml b/compose.local-data.yml new file mode 100644 index 0000000..29c56c5 --- /dev/null +++ b/compose.local-data.yml @@ -0,0 +1,7 @@ +volumes: + nextdata: + driver: local + driver_opts: + type: none + o: bind + device: ${NEXTDATA_PATH}