-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployWebServer.yml
81 lines (81 loc) · 1.74 KB
/
deployWebServer.yml
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
# Deploy Webserver
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: apache-hypertube
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: apache-hypertube
template:
metadata:
labels:
app: apache-hypertube
spec:
imagePullSecrets:
- name: gitlab-registry
containers:
- image: git.harknet.ml:5005/becrespi/hypertube/apache2:_VERSION_
name: apache-hypertube
ports:
- containerPort: 80
env:
- name: API_DOMAIN_NAME
value: _API_DOMAIN_NAME_
- name: FRONT_DOMAIN_NAME
value: _FRONT_DOMAIN_NAME_
tty: true
volumeMounts:
- mountPath: /var/www/html/movies
name: apache-hypertube-claim0
- mountPath: /var/www/html/pictures
name: apache-hypertube-claim1
restartPolicy: Always
volumes:
- name: apache-hypertube-claim0
persistentVolumeClaim:
claimName: apache-hypertube-claim0
- name: apache-hypertube-claim1
persistentVolumeClaim:
claimName: apache-hypertube-claim1
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
volumeClaim: apache-hypertube-claim0
name: apache-hypertube-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
volumeClaim: apache-hypertube-claim1
name: apache-hypertube-claim1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
kind: Service
apiVersion: v1
metadata:
name: apache-hypertube
spec:
selector:
app: apache-hypertube
type: NodePort
ports:
- port: 80
nodePort: 30042