From 21c6b627a8b063e9a8b9529b19f16fc4e227c45b Mon Sep 17 00:00:00 2001 From: Gleb Koval Date: Tue, 26 Sep 2023 23:24:07 +0000 Subject: [PATCH] Cloud VM: mount data to /var/lib/docker (#8) Since Nextcloud AIO manages itself and uses docker volumes, the easiest way to persisty all data in a separate disk is to just mount it to `/var/lib/docker`. This is still an easier long-term solution than managing the entire stack manually - we can always migrate (relatively) easily in the future anyway. Reviewed-on: https://git.koval.net/cyclane/kovalhome/pulls/8 --- infra/cloud/0001_initialise_playbook.yaml | 8 +------- infra/cloud/nextcloud/all-in-one.sh | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/infra/cloud/0001_initialise_playbook.yaml b/infra/cloud/0001_initialise_playbook.yaml index 579ebcc..c7a7e5e 100644 --- a/infra/cloud/0001_initialise_playbook.yaml +++ b/infra/cloud/0001_initialise_playbook.yaml @@ -35,14 +35,8 @@ - name: Mount data partition ansible.posix.mount: src: /dev/disk/by-path/pci-0000:00:05.0-scsi-0:0:0:1-part1 - path: /mnt/data + path: /var/lib/docker fstype: ext4 opts: rw,errors=remount-ro,x-systemd.growfs state: mounted become: true - - name: Set data partition permissions - ansible.builtin.file: - path: /mnt/data - owner: debian - group: debian - become: true diff --git a/infra/cloud/nextcloud/all-in-one.sh b/infra/cloud/nextcloud/all-in-one.sh index b169620..1f605aa 100644 --- a/infra/cloud/nextcloud/all-in-one.sh +++ b/infra/cloud/nextcloud/all-in-one.sh @@ -9,7 +9,6 @@ docker run \ --name nextcloud-aio-mastercontainer \ --restart unless-stopped \ --publish 8080:8080 \ ---env NEXTCLOUD_DATADIR=/mnt/data/nextcloud \ --env NEXTCLOUD_UPLOAD_LIMIT=16G \ --env NEXTCLOUD_MAX_TIME=7200 \ --env APACHE_PORT=11000 \