2024-04-22 17:14:07 +02:00

91 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nextcloud-app
name: nextcloud-app
spec:
replicas: 1
selector:
matchLabels:
app: nextcloud-app
strategy:
type: Recreate
template:
metadata:
labels:
app: nextcloud-app
spec:
containers:
- image: mariadb
name: nextcloud-db
args:
- --transaction-isolation=READ-COMMITTED
- --binlog-format=ROW
- --innodb-file-per-table=1
- --skip-innodb-read-only-compressed
env:
- name: MYSQL_DATABASE
value: nextcloud
- name: MYSQL_USER
value: nextcloud
- name: REDIS_HOST
value: localhost
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: nextcloud-secret
key: MYSQL_PASSWORD
resources: {}
ports:
- containerPort: 3306
protocol: TCP
volumeMounts:
- mountPath: /var/lib/mysql
name: nextcloud-pvc
subPath: db-storage
- image: redis:alpine
name: redis
resources: {}
ports:
- containerPort: 6379
protocol: TCP
- image: nextcloud
name: nextcloud-app
env:
- name: MYSQL_DATABASE
value: nextcloud
- name: MYSQL_HOST
value: localhost
- name: MYSQL_USER
value: nextcloud
- name: PHP_MEMORY_LIMIT
value: 2G
- name: PHP_UPLOAD_LIMIT
value: 100G
- name: REDIS_HOST
value: localhost
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: nextcloud-secret
key: MYSQL_PASSWORD
ports:
- name: http
containerPort: 80
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /var/www/html
name: nextcloud-pvc
subPath: html
- mountPath: /var/www/html/data
name: nextcloud-pvc
subPath: data
restartPolicy: Always
volumes:
- name: nextcloud-pvc
nfs:
server: 192.168.178.4
path: /mnt/storage/service/nextcloud
readOnly: false