-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03-nextcloud.yaml
137 lines (137 loc) · 2.94 KB
/
03-nextcloud.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#
# ConfigMap NGINX
#
apiVersion: v1
kind: ConfigMap
metadata:
name: php-ini
namespace: nextcloud-fpm
data:
php.ini: |
[PHP]
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 200
---
#
#
# Deployment
#
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud
namespace: nextcloud-fpm
spec:
selector:
matchLabels:
app: nextcloud
replicas: 1
template:
metadata:
labels:
app: nextcloud
spec:
containers:
#
# Nginx
#
- name: nginx
image: nginx:stable-alpine
ports:
- containerPort: 80
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
- name: html-shared
mountPath: /var/www/html
- name: htmldata
mountPath: /var/www/html/data
- name: html-custom-apps
mountPath: /var/www/html/custom_apps
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "mkdir -p /var/www/html"]
#
# Nextcloud
#
- name: nextcloud
image: nextcloud:fpm-alpine
ports:
- containerPort: 9000
volumeMounts:
- name: html-shared
mountPath: /var/www/html
- name: htmldata
mountPath: /var/www/html/data
- name: html-custom-apps
mountPath: /var/www/html/custom_apps
- name: nextcloud-config
mountPath: /var/www/html/config
- name: php-config
mountPath: /usr/local/etc/php/php.ini
subPath: php.ini
resources:
limits:
memory: 200Mi
requests:
memory: 150Mi
##
# livenessProbe:
# failureThreshold: 2
# initialDelaySeconds: 180
# periodSeconds: 60
# timeoutSeconds: 10
# httpGet:
# path: /status.php
# port: 443
# host: nextcloud.dd8ne.ddnss.de
##
#
# local Mountpoint
#
volumes:
- name: html-shared
# Filled by nextcloud at start
emptyDir: {}
- name: htmldata
# User data
hostPath:
path: "/gluster/nextcloud/data"
- name: html-custom-apps
# additional apps
hostPath:
path: "/gluster/nextcloud/custom_apps"
- name: nextcloud-config
# nextcloud config
hostPath:
path: "/gluster/nextcloud/config"
- name: nginx-config
# nginx config
hostPath:
path: "/gluster/nextcloud/php/nginx.conf"
- name: php-config
# php.ini (Max Upload)
configMap:
name: php-ini
#
#
# Services
#
#
---
apiVersion: v1
kind: Service
metadata:
name: nextcloud
namespace: nextcloud-fpm
spec:
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: nextcloud
---