scripts/fogcutter/k8s/nextcloud.yml

200 lines
4.2 KiB
YAML
Raw Normal View History

2020-11-05 19:43:47 -05:00
# to scan new files: k exec --stdin --tty nextcloud-POD -npew -- /bin/bash -c "/var/www/html/occ files:scan --path='/USER/files'"
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: nextcloud
name: nextcloud
namespace: pew
spec:
replicas: 1
selector:
matchLabels:
run: nextcloud
template:
metadata:
labels:
run: nextcloud
spec:
containers:
- name: nextcloud
image: nextcloud:20.0.1-apache
env:
- name: OVERWRITEHOST
value: "nc.seaturtle.pw"
- name: OVERWRITEPROTOCOL
value: "https"
- name: MYSQL_DATABASE
value: "nextcloud"
- name: MYSQL_USER
value: "nextcloud"
- name: MYSQL_PASSWORD
value: "nextcloud"
- name: MYSQL_HOST
value: "nextcloud-mariadb.pew"
- name: REDIS_HOST
value: "nextcloud-redis.pew"
- name: REDIS_HOST_PASSWORD
value: "nextcloud"
volumeMounts:
- mountPath: /var/www/html
name: nextcloud-data
readOnly: false
ports:
- name: http
containerPort: 80
volumes:
- name: nextcloud-data
hostPath:
path: /bigdata/k8s-config/nextcloud/data
2020-11-07 09:41:31 -05:00
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: nextcloud-cron
namespace: pew
spec:
schedule: "*/10 * * * *"
successfulJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: nextcloud-cron
image: nextcloud:20.0.1-apache
command:
- "php"
- "-f"
- "/var/www/html/cron.php"
volumeMounts:
- mountPath: /var/www/html
name: nextcloud-data
readOnly: false
volumes:
- name: nextcloud-data
hostPath:
path: /bigdata/k8s-config/nextcloud/data
---
apiVersion: v1
kind: Service
metadata:
labels:
run: nextcloud
name: nextcloud
namespace: pew
spec:
selector:
run: nextcloud
ports:
- name: http
port: 80
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: nextcloud-mariadb
name: nextcloud-mariadb
namespace: pew
spec:
replicas: 1
selector:
matchLabels:
run: nextcloud-mariadb
template:
metadata:
labels:
run: nextcloud-mariadb
spec:
containers:
- name: mariadb
image: mariadb:10.5.6
env:
- name: MYSQL_RANDOM_ROOT_PASSWORD
value: "notnullvalue"
- name: MYSQL_PASSWORD
value: "nextcloud"
- name: MYSQL_DATABASE
value: "nextcloud"
- name: MYSQL_USER
value: "nextcloud"
volumeMounts:
- mountPath: /var/lib/mysql
name: nextcloud-mariadb
readOnly: false
ports:
- name: mysql
containerPort: 3306
volumes:
- name: nextcloud-mariadb
hostPath:
path: /bigdata/k8s-config/nextcloud/mariadb
---
apiVersion: v1
kind: Service
metadata:
labels:
run: nextcloud-mariadb
name: nextcloud-mariadb
namespace: pew
spec:
selector:
run: nextcloud-mariadb
ports:
- name: mysql
port: 3306
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: nextcloud-redis
name: nextcloud-redis
namespace: pew
spec:
replicas: 1
selector:
matchLabels:
run: nextcloud-redis
template:
metadata:
labels:
run: nextcloud-redis
spec:
containers:
- name: redis
image: redis:6.0.9
args:
2020-11-05 23:59:02 -05:00
- --requirepass
- nextcloud
ports:
- name: redis
containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
labels:
run: nextcloud-redis
name: nextcloud-redis
namespace: pew
spec:
selector:
run: nextcloud-redis
ports:
- name: redis
port: 6379
protocol: TCP