54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nextcloud
|
|
namespace: tools
|
|
spec:
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: nextcloud
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
initContainers:
|
|
- name: wait-for-db
|
|
image: busybox
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z -v -w30 nextcloud-db-service 3306; do
|
|
echo "Waiting for database to be ready..."
|
|
sleep 2
|
|
done
|
|
containers:
|
|
- name: nextcloud
|
|
image: lscr.io/linuxserver/nextcloud:32.0.2
|
|
ports:
|
|
- containerPort: 443
|
|
env:
|
|
- name: PGID
|
|
value: "1000"
|
|
- name: PUID
|
|
value: "1000"
|
|
- name: TZ
|
|
value: "Asia/Kolkata"
|
|
volumeMounts:
|
|
- name: nextcloud-data
|
|
mountPath: /data
|
|
- name: nextcloud-config
|
|
mountPath: /config
|
|
volumes:
|
|
- name: nextcloud-data
|
|
nfs:
|
|
path: /home/akshun/nextcloud-data
|
|
server: 10.0.0.10
|
|
- name: nextcloud-config
|
|
persistentVolumeClaim:
|
|
claimName: nextcloud-longhorn
|