From 9be95c234e08b9d7e98ca29079f3faf275ba1de4 Mon Sep 17 00:00:00 2001 From: Jean Froment Date: Mon, 14 Feb 2022 10:31:12 +0100 Subject: [PATCH] DB runs as user + add notes.md for nextcloud-db volume relocation --- notes.md | 16 ++++++++++++++++ services/nextcloud.yaml | 1 + 2 files changed, 17 insertions(+) create mode 100644 notes.md diff --git a/notes.md b/notes.md new file mode 100644 index 0000000..6533e24 --- /dev/null +++ b/notes.md @@ -0,0 +1,16 @@ +# Nextcloud-db has moved + +Since commit e4ede925a8ce09b177206f30487a889da9e10334, nextcloud-db directory (mapped on /var/lib/mysql) has moved from +``/data/nextcloud-db`` to ``$HOST_CONFIG_PATH/nextcloud-db`` (*/data/config/nextcloud-db by default*). + +To ensure a smooth transition, you will have to move the directory nextcloud-db into the correct new location, then run some commands to fix the schema: + +```sh +mv /data/nextcloud-db/ /data/config/ +./update-all.sh +source .env +docker exec -it nextcloud-db mysql_upgrade -u root -p${MYSQL_ROOT_PASSWORD} +docker restart nextcloud nextcloud-db +``` + +Ensure everything runs nicely by looking at nextcloud-db and nextcloud logs, and by accessing your Nextcloud web UI. diff --git a/services/nextcloud.yaml b/services/nextcloud.yaml index 9600d10..332db77 100755 --- a/services/nextcloud.yaml +++ b/services/nextcloud.yaml @@ -3,6 +3,7 @@ services: image: mariadb:10 container_name: nextcloud-db command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed + user: ${PUID}:${PGID} restart: always environment: - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}