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'"
|
2020-11-03 21:24:05 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
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:
|
2020-11-05 19:10:26 -05:00
|
|
|
path: /bigdata/k8s-config/nextcloud/data
|
2020-11-03 21:24:05 -05:00
|
|
|
|
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
|
|
|
|
|
2020-11-03 21:24:05 -05:00
|
|
|
---
|
|
|
|
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:
|
2020-11-05 19:10:26 -05:00
|
|
|
path: /bigdata/k8s-config/nextcloud/mariadb
|
2020-11-03 21:24:05 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
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
|
2020-11-03 21:24:05 -05:00
|
|
|
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
|