Move the nextcloud data to a normal NFS volume

This commit is contained in:
Andreas Zweili 2024-01-15 15:03:43 +01:00
parent 913beb8324
commit 0bb3d8c7a4
1 changed files with 4 additions and 8 deletions

View File

@ -81,11 +81,10 @@ in {
volumes = [ volumes = [
"${inputs.self}/modules/services/nextcloud/custom-php.ini:/usr/local/etc/php/conf.d/zzz-custom.ini:ro" "${inputs.self}/modules/services/nextcloud/custom-php.ini:/usr/local/etc/php/conf.d/zzz-custom.ini:ro"
"/etc/localtime:/etc/localtime:ro" "/etc/localtime:/etc/localtime:ro"
"${volumePath}:/var/www/html"
]; ];
dependsOn = [ "redis" ]; dependsOn = [ "redis" ];
extraOptions = [ extraOptions = [
''
--mount=type=volume,source=nextcloud_data,target=/var/www/html,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/server_data/nextcloud/data,"volume-opt=o=addr=10.7.89.108,rw,nfsvers=4.0,nolock,hard,noatime"''
"--add-host=host.docker.internal:host-gateway" "--add-host=host.docker.internal:host-gateway"
"--net=${networkName}" "--net=${networkName}"
"--log-opt=tag='nextcloud'" "--log-opt=tag='nextcloud'"
@ -98,13 +97,10 @@ in {
volumes = [ volumes = [
"${inputs.self}/modules/services/nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro" "${inputs.self}/modules/services/nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro"
"/etc/localtime:/etc/localtime:ro" "/etc/localtime:/etc/localtime:ro"
"${volumePath}:/var/www/html"
]; ];
extraOptions = [ extraOptions =
'' [ "--net=${networkName}" "--log-opt=tag='nextcloud-nginx'" ];
--mount=type=volume,source=nextcloud_data,target=/var/www/html,volume-driver=local,volume-opt=type=nfs,volume-opt=device=:/server_data/nextcloud/data,"volume-opt=o=addr=10.7.89.108,ro,nfsvers=4.0,nolock,hard,noatime"''
"--net=${networkName}"
"--log-opt=tag='nextcloud-nginx'"
];
}; };
containers."cron" = { containers."cron" = {
image = nextcloudImage; image = nextcloudImage;