-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-deploy.yaml
72 lines (72 loc) · 1.98 KB
/
nginx-deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud
namespace: nextcloud
spec:
selector:
matchLabels:
app: nextcloud
replicas: 1
template:
metadata:
labels:
app: nextcloud
spec:
volumes:
- name: webroot
persistentVolumeClaim:
claimName: nextcloud
#- name: nextclouddata
# persistentVolumeClaim:
# claimName: nextcloud-data
- name: nginx-config
configMap:
name: nginx-config
- name: tz-edmonton
hostPath:
path: /usr/share/America/Edmonton
# OUTCOMMENT next 3 rows if certs don't work
- name: tls-cert
secret:
secretName: nextcloud-cert-tls
#no touchy
containers:
- name: nginx
image: nginx:alpine
imagePullPolicy: "Always"
env:
- name: PHP_SOCKET
value: php:9000
- name: WEBROOT
#value: /nextcloud
value: /var/www/html
- name: INCLUDE
value: include /etc/nginx/conf.d/nextcloud.include;
ports:
- containerPort: 80
- containerPort: 443
volumeMounts:
- name: webroot
#mountPath: /nextcloud
mountPath: /var/www/html
#- name: nextclouddata
# mountPath: /nextcloud-data
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
readOnly: true
- name: nginx-config
mountPath: /etc/nginx/templates/default.conf.template
subPath: default.conf.template
readOnly: true
- name: nginx-config
mountPath: /etc/nginx/templates/nextcloud.include.template
subPath: nextcloud.include.template
readOnly: true
- name: tz-edmonton
mountPath: /etc/localtime
# OUTCOMMENT IF CERT DOESNT WORK
- name: tls-cert
mountPath: "/etc/ssl/nginx/"
readOnly: true