ADD: added working nextcloud version

This commit is contained in:
2026-03-02 20:49:50 +01:00
parent f0c47beaad
commit f0a02c3740
12 changed files with 204 additions and 47 deletions

View File

@@ -0,0 +1,33 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: collabora
namespace: nextcloud
spec:
replicas: 1
selector:
matchLabels:
app: collabora
template:
metadata:
labels:
app: collabora
spec:
containers:
- name: collabora
image: collabora/code:latest
imagePullPolicy: Always
ports:
- containerPort: 9980
env:
- name: domain
value: "henryathome.home64.de"
- name: extra_params
value: "--o:ssl.enable=false --o:ssl.termination=true"
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "4Gi"
cpu: "2"

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: collabora-nodeport
namespace: nextcloud
spec:
type: NodePort
selector:
app: collabora
ports:
- port: 9980
targetPort: 9980
nodePort: 30980

View File

@@ -28,10 +28,17 @@ spec:
value: nextcloud
ports:
- containerPort: 3306
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
volumeMounts:
- name: mariadb-data
mountPath: /var/lib/mysql
volumes:
- name: mariadb-data
persistentVolumeClaim:
claimName: pvc-mariadb
claimName: nextcloud-mariadb-pvc

View File

@@ -1,7 +1,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-mariadb
name: nextcloud-mariadb-pvc
namespace: nextcloud
spec:
accessModes:
@@ -14,7 +14,7 @@ spec:
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-mariadb
name: nextcloud-mariadb-pv
labels:
app: mariadb
spec:
@@ -26,7 +26,7 @@ spec:
storageClassName: local-path
claimRef:
namespace: nextcloud
name: pvc-mariadb
name: nextcloud-mariadb-pvc
hostPath:
path: /var/lib/mariadb-data
path: /var/lib/nextcloud/mariadb-data
type: DirectoryOrCreate

View File

@@ -0,0 +1,31 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nextcloud-apps-pvc
namespace: nextcloud
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeName: nextcloud-apps-pv
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nextcloud-apps-pv
labels:
app: nextcloud
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
claimRef:
namespace: nextcloud
name: nextcloud-apps-pvc
hostPath:
path: /var/lib/nextcloud/custom_apps
type: DirectoryOrCreate

View File

@@ -0,0 +1,32 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nextcloud-config-pvc
namespace: nextcloud
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: local-path # match mariadb local-path style
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-nextcloud-config
labels:
app: nextcloud
spec:
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: local-path
claimRef:
namespace: nextcloud
name: nextcloud-config-pvc
hostPath:
path: /var/lib/nextcloud/nextcloud-config
type: DirectoryOrCreate

View File

@@ -0,0 +1,21 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: nextcloud-webcron
namespace: nextcloud
spec:
schedule: "*/5 * * * *" # alle 5 Minuten
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
activeDeadlineSeconds: 300
template:
spec:
restartPolicy: Never
containers:
- name: webcron
image: curlimages/curl:8.5.0
command: ["/bin/sh", "-c"]
args:
- 'until curl -fsS http://nextcloud.nextcloud.svc.cluster.local/status.php; do echo "waiting for nextcloud..."; sleep 5; done; curl -s -o /dev/null -w "%{http_code}\n" http://nextcloud.nextcloud.svc.cluster.local/cron.php'

View File

@@ -38,18 +38,36 @@ spec:
- name: REDIS_HOST
value: redis.nextcloud.svc.cluster.local
- name: NEXTCLOUD_TRUSTED_DOMAINS
value: "henryathome.home64.de,192.168.178.0/24,192.168.178.138"
# resources:
# requests:
# memory: "512Mi"
# cpu: "250m"
# limits:
# memory: "1Gi"
# cpu: "1000m"
value: "henryathome.home64.de,192.168.178.0/24,192.168.178.138,nextcloud.nextcloud.svc.cluster.local"
- name: TRUSTED_PROXIES
value: "192.168.178.120"
- name: OVERWRITEHOST
value: "henryathome.home64.de"
- name: OVERWRITEPROTOCOL
value: "https"
- name: OVERWRITECLIURL
value: "https://henryathome.home64.de"
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "4Gi"
cpu: "3000m"
volumeMounts:
- name: data
mountPath: /var/www/html/data # angepasst auf Standard Nextcloud Datadir
mountPath: /var/www/html/data
- name: config
mountPath: /var/www/html/config
- name: apps
mountPath: /var/www/html/custom_apps
volumes:
- name: data
persistentVolumeClaim:
claimName: nextcloud-data-pvc
- name: config
persistentVolumeClaim:
claimName: nextcloud-config-pvc
- name: apps
persistentVolumeClaim:
claimName: nextcloud-apps-pvc

View File

@@ -112,4 +112,4 @@ spec:
claimName: immich-library-pvc
- name: ext-library
persistentVolumeClaim:
claimName: photoprism-storage
claimName: photoprism-library-pvc

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: photoprism-library-pvc
namespace: photoprism
spec:
storageClassName: nfs
volumeName: photos-nfs-pv
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi

View File

@@ -1,31 +1,3 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: photoprism-storage
namespace: photoprism
spec:
storageClassName: nfs
volumeName: nfs-pv
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi
---
#apiVersion: v1
#kind: PersistentVolumeClaim
#metadata:
# name: photoprism-originals
# namespace: photoprism
#spec:
# storageClassName: nfs
# volumeName: nfs-pv
# accessModes:
# - ReadWriteMany
# resources:
# requests:
# storage: 100Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -101,7 +73,7 @@ spec:
# memory: "512Mi"
volumeMounts:
- mountPath: /photoprism/
name: photoprism-storage
name: photoprism-library-pvc
# - mountPath: /photoprism/storage
# name: photoprism-storage
# - mountPath: /photoprism/originals
@@ -111,9 +83,9 @@ spec:
# runAsUser: 1000
# runAsGroup: 1000
volumes:
- name: photoprism-storage
- name: photoprism-library-pvc
persistentVolumeClaim:
claimName: photoprism-storage
claimName: photoprism-library-pvc
# - name: photoprism-originals
# persistentVolumeClaim:
# claimName: photoprism-originals

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: photos-nfs-pv
spec:
capacity:
storage: 200Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: nfs
nfs:
server: 192.168.178.186
path: /volume1/Photos
mountOptions:
- hard
- nfsvers=4