nextcloud: restore single data volume mount

This commit is contained in:
Brad Stein 2026-01-07 03:52:14 -03:00
parent da81946771
commit 46c0a4e290
3 changed files with 13 additions and 34 deletions

View File

@ -24,14 +24,9 @@ spec:
args:
- "cd /var/www/html && php -f cron.php"
volumeMounts:
- name: nextcloud-app
- name: nextcloud-data
mountPath: /var/www/html
- name: nextcloud-user-data
mountPath: /var/www/html/data
volumes:
- name: nextcloud-app
- name: nextcloud-data
persistentVolumeClaim:
claimName: nextcloud-app
- name: nextcloud-user-data
persistentVolumeClaim:
claimName: nextcloud-user-data
claimName: nextcloud-data

View File

@ -42,10 +42,8 @@ spec:
runAsUser: 0
runAsGroup: 0
volumeMounts:
- name: nextcloud-app
- name: nextcloud-data
mountPath: /var/www/html
- name: nextcloud-user-data
mountPath: /var/www/html/data
- name: nextcloud-config
mountPath: /var/www/html/config/extra.config.php
subPath: extra.config.php
@ -58,9 +56,7 @@ spec:
args:
- |
installed="$(su -s /bin/sh www-data -c "php /var/www/html/occ status" 2>/dev/null | awk '/installed:/{print $3}' || true)"
if [ ! -s /var/www/html/config/config.php ] || [ "${installed}" != "true" ]; then
rm -f /var/www/html/config/config.php || true
rm -rf /var/www/html/data/* || true
if [ ! -s /var/www/html/config/config.php ] && [ ! -f /var/www/html/data/.ocdata ]; then
su -s /bin/sh www-data -c "php /var/www/html/occ maintenance:install --database pgsql --database-host \"${POSTGRES_HOST}\" --database-name \"${POSTGRES_DB}\" --database-user \"${POSTGRES_USER}\" --database-pass \"${POSTGRES_PASSWORD}\" --admin-user \"${NEXTCLOUD_ADMIN_USER}\" --admin-pass \"${NEXTCLOUD_ADMIN_PASSWORD}\" --data-dir /var/www/html/data"
chown 33:33 /var/www/html/config/config.php || true
chown -R 33:33 /var/www/html/data || true
@ -143,10 +139,8 @@ spec:
name: nextcloud-oidc
key: client-secret
volumeMounts:
- name: nextcloud-app
- name: nextcloud-data
mountPath: /var/www/html
- name: nextcloud-user-data
mountPath: /var/www/html/data
- name: nextcloud-config
mountPath: /var/www/html/config/extra.config.php
subPath: extra.config.php
@ -232,14 +226,12 @@ spec:
- containerPort: 80
name: http
volumeMounts:
- name: nextcloud-app
- name: nextcloud-data
mountPath: /var/www/html
- name: nextcloud-user-data
mountPath: /var/www/html/data
- name: nextcloud-config
mountPath: /var/www/html/config/extra.config.php
subPath: extra.config.php
resources:
resources:
requests:
cpu: 250m
memory: 1Gi
@ -247,12 +239,9 @@ spec:
cpu: 1
memory: 3Gi
volumes:
- name: nextcloud-app
- name: nextcloud-data
persistentVolumeClaim:
claimName: nextcloud-app
- name: nextcloud-user-data
persistentVolumeClaim:
claimName: nextcloud-user-data
claimName: nextcloud-data
- name: nextcloud-config
configMap:
name: nextcloud-config

View File

@ -34,10 +34,8 @@ spec:
name: nextcloud-admin
key: admin-password
volumeMounts:
- name: nextcloud-app
- name: nextcloud-data
mountPath: /var/www/html
- name: nextcloud-user-data
mountPath: /var/www/html/data
- name: maintenance-script
mountPath: /maintenance/maintenance.sh
subPath: maintenance.sh
@ -49,12 +47,9 @@ spec:
cpu: 500m
memory: 512Mi
volumes:
- name: nextcloud-app
- name: nextcloud-data
persistentVolumeClaim:
claimName: nextcloud-app
- name: nextcloud-user-data
persistentVolumeClaim:
claimName: nextcloud-user-data
claimName: nextcloud-data
- name: maintenance-script
configMap:
name: nextcloud-maintenance-script