Move Gitea and Nextcloud storage to NAS
- Gitea: data volume moved from local ./data to /mnt/nas/docker-data/gitea/data - Nextcloud app: data volume moved from Docker named volume to /mnt/nas/docker-data/nextcloud/app-data - Nextcloud DB: moved to /mnt/nas/docker-data/nextcloud/db-data with NFS compatibility fixes: - user: 1024:100 to match NAS file ownership and avoid chown failures - innodb_use_native_aio=0 (NFS requirement) - innodb_flush_method=O_DIRECT (better NFS performance) - MARIADB_INITDB_SKIP_TZINFO=1 (avoid tz table load on NFS) - Removed named Docker volumes nextcloud_db and nextcloud_data (replaced by NAS mounts)
This commit is contained in:
@@ -10,13 +10,18 @@ services:
|
||||
image: mariadb:10.11
|
||||
restart: unless-stopped
|
||||
container_name: nextcloud-db
|
||||
user: "1024:100" # Match NAS file ownership (uid 1024, gid 100) to bypass chown on NFS
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password
|
||||
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
|
||||
- MYSQL_DATABASE=nextcloud
|
||||
- MYSQL_USER=nextcloud
|
||||
- MARIADB_INITDB_SKIP_TZINFO=1 # Skip timezone loading on NFS
|
||||
volumes:
|
||||
- nextcloud_db:/var/lib/mysql
|
||||
- /mnt/nas/docker-data/nextcloud/db-data:/var/lib/mysql
|
||||
command:
|
||||
- --innodb_use_native_aio=0 # Required for NFS
|
||||
- --innodb_flush_method=O_DIRECT # Better NFS performance
|
||||
networks:
|
||||
- nextcloud
|
||||
secrets:
|
||||
@@ -49,7 +54,7 @@ services:
|
||||
- OVERWRITEHOST=ak-homelab.duckdns.org
|
||||
- OVERWRITEWEBROOT=/cloud
|
||||
volumes:
|
||||
- nextcloud_data:/var/www/html
|
||||
- /mnt/nas/docker-data/nextcloud/app-data:/var/www/html
|
||||
# External storage mounts for existing folders
|
||||
- /home/hoborg/shared:/external_storage/shared:rw
|
||||
- /home/hoborg/Documents:/external_storage/documents:rw
|
||||
@@ -74,10 +79,6 @@ secrets:
|
||||
nextcloud_admin_password:
|
||||
file: /home/hoborg/creds/nextcloud_admin_password.txt
|
||||
|
||||
volumes:
|
||||
nextcloud_db:
|
||||
nextcloud_data:
|
||||
|
||||
networks:
|
||||
nextcloud:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user