Files
docker-images/_apps/nextcloud/deployment.yaml
Udo Waechter 4b2f5d8c9f
All checks were successful
continuous-integration/drone/push Build is passing
merged
2024-04-21 17:02:48 +02:00

141 lines
3.6 KiB
YAML

#we use postgresql:
#create database nextcloud;
#create user nextcloud with encrypted password 'secret';
#grant all privileges on database nextcloud to nextcloud;
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud
labels:
app: nextcloud
release: latest
spec:
replicas: 1
selector:
matchLabels:
app: nextcloud
release: latest
template:
metadata:
labels:
app: nextcloud
release: latest
spec:
volumes:
- name: nextcloud-nginx-site
configMap:
name: nextcloud-nginx-site
- name: nextcloud-config
configMap:
name: nextcloud-config
- name: www-data
emptyDir: {}
containers:
- name: nginx-proxy
image: nginx
volumeMounts:
- name: nextcloud-nginx-site
mountPath: /etc/nginx/conf.d
- name: www-data
mountPath: /var/www/html
ports:
- name: http
containerPort: 80
protocol: TCP
- name: nextcloud
image: cr.lan/nextcloud:latest
lifecycle:
postStart:
exec:
command:
- /post-start.sh
volumeMounts:
- name: www-data
mountPath: /var/www/html
#- name: nextcloud-config
# mountPath: /var/www/html/config/config.php
# subPath: config.php
env:
- name: TZ
value: "Europe/Berlin"
- name: POSTGRES_HOST
value: postgres.live-env.svc.cluster.local:5432
- name: POSTGRES_DB
value: nextcloud
- name: POSTGRES_USER
value: nextcloud
- name: POSTGRES_PASSWORD
value: Vb7yHzmE5HIjfU4hf89aXAmEEmxAnMdB
- name: NEXTCLOUD_TRUSTED_DOMAINS
value: nc nc.lan 172.23.255.1
- name: OBJECTSTORE_S3_HOST
value: minio.live-infra.svc.cluster.local
- name: OBJECTSTORE_S3_BUCKET
value: nextcloud
- name: OBJECTSTORE_S3_KEY
value: nextcloud
- name: OBJECTSTORE_S3_SECRET
value: tWnc3zdxcDUvcX5f9uY7RRYvKLcWI1KY
- name: OBJECTSTORE_S3_PORT
value: "443"
- name: OBJECTSTORE_S3_USEPATH_STYLE
value: "true"
- name: OBJECTSTORE_S3_SSL
value: "true"
ports:
- name: php-fpm
containerPort: 9000
protocol: TCP
# startupProbe:
# httpGet:
# path: /
# port: http
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: http
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "768Mi"
cpu: "3000m"
---
apiVersion: v1
kind: Service
metadata:
name: nextcloud
spec:
ports:
- name: http
port: 80
selector:
app: nextcloud
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nextcloud
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/whitelist-x-forwarded-for: "true"
nginx.ingress.kubernetes.io/proxy-body-size: 512m
spec:
rules:
- host: nc.lan
http:
paths:
- backend:
service:
name: nextcloud
port:
name: http
path: /
pathType: Prefix