72 lines
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nextcloud
name: nextcloud
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
app: nextcloud
strategy:
type: Recreate
template:
metadata:
labels:
app: nextcloud
spec:
containers:
- name: cron
image: nextcloud:latest
volumeMounts:
- mountPath: /var/www/html
name: nextcloud-pvc
subPath: 99f37b73-8f14-44b2-9211-af5de21de749/html
- mountPath: /var/www/html/data
name: nextcloud-data
command: [ "/cron.sh" ]
resources: {}
- image: nextcloud
name: nextcloud
env:
- name: MYSQL_DATABASE
value: nextcloud
- name: MYSQL_HOST
value: maridb:3306
- name: MYSQL_USER
value: nextcloud
- name: PHP_MEMORY_LIMIT
value: 2G
- name: PHP_UPLOAD_LIMIT
value: 100G
- name: REDIS_HOST
value: redis
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: nextcloud-secret
key: MYSQL_PASSWORD
ports:
- name: nextcloud
containerPort: 80
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /var/www/html
name: nextcloud-pvc
subPath: 99f37b73-8f14-44b2-9211-af5de21de749/html
- mountPath: /var/www/html/data
name: nextcloud-data
restartPolicy: Always
volumes:
- name: nextcloud-pvc
persistentVolumeClaim:
claimName: nextcloud-pvc
- name: nextcloud-data
nfs:
server: 192.168.178.4
path: /mnt/storage/service/nextcloud/data
readOnly: false