@@ -3,6 +3,81 @@ kind: Template
3
3
metadata :
4
4
name : bookstack
5
5
objects :
6
+ - apiVersion : " v1"
7
+ kind : " PersistentVolumeClaim"
8
+ metadata :
9
+ name : " bookstack-db"
10
+ spec :
11
+ accessModes :
12
+ - " ReadWriteOnce"
13
+ resources :
14
+ requests :
15
+ storage : " 5Gi"
16
+ - apiVersion : " v1"
17
+ kind : " PersistentVolumeClaim"
18
+ metadata :
19
+ name : " bookstack-storage"
20
+ spec :
21
+ accessModes :
22
+ - " ReadWriteOnce"
23
+ resources :
24
+ requests :
25
+ storage : " 5Gi"
26
+ - apiVersion : " v1"
27
+ kind : " PersistentVolumeClaim"
28
+ metadata :
29
+ name : " bookstack-uploads"
30
+ spec :
31
+ accessModes :
32
+ - " ReadWriteOnce"
33
+ resources :
34
+ requests :
35
+ storage : " 5Gi"
36
+ - apiVersion : apps.openshift.io/v1
37
+ kind : DeploymentConfig
38
+ metadata :
39
+ labels :
40
+ app : bookstack
41
+ template : bookstack
42
+ name : bookstack-db
43
+ spec :
44
+ replicas : 1
45
+ strategy :
46
+ type : Rolling
47
+ template :
48
+ metadata :
49
+ labels :
50
+ name : bookstack-db
51
+ spec :
52
+ containers :
53
+ - image : mysql:5.7.21
54
+ imagePullPolicy : Always
55
+ name : bookstack-db
56
+ ports :
57
+ - containerPort : 3306
58
+ protocol : TCP
59
+ env :
60
+ - name : MYSQL_ROOT_PASSWORD
61
+ value : secret
62
+ - name : MYSQL_DATABASE
63
+ value : bookstack
64
+ - name : MYSQL_USER
65
+ value : bookstack
66
+ - name : MYSQL_PASSWORD
67
+ value : secret
68
+ volumeMounts :
69
+ - mountPath : /var/lib/mysql
70
+ name : bookstack-db
71
+ dnsPolicy : ClusterFirst
72
+ restartPolicy : Always
73
+ schedulerName : default-scheduler
74
+ terminationGracePeriodSeconds : 30
75
+ volumes :
76
+ - name : bookstack-db
77
+ persistentVolumeClaim :
78
+ claimName : bookstack-db
79
+ triggers :
80
+ - type : ConfigChange
6
81
- apiVersion : apps.openshift.io/v1
7
82
kind : DeploymentConfig
8
83
metadata :
@@ -19,24 +94,88 @@ objects:
19
94
name : bookstack
20
95
spec :
21
96
containers :
22
- - image : pacroy/bookstack-openshift
97
+ - image : pacroy/bookstack-openshift:1.0.0
23
98
imagePullPolicy : Always
24
99
name : bookstack
25
100
ports :
26
101
- containerPort : 8080
27
102
protocol : TCP
28
103
env :
29
104
- name : DB_HOST
30
- value : bookstack_db :3306
105
+ value : bookstack-db :3306
31
106
- name : DB_DATABASE
32
107
value : bookstack
33
108
- name : DB_USERNAME
34
109
value : bookstack
35
110
- name : DB_PASSWORD
36
111
value : secret
112
+ volumeMounts :
113
+ - mountPath : /var/www/bookstack/public/storage
114
+ name : bookstack-storage
115
+ - mountPath : /var/www/bookstack/public/uploads
116
+ name : bookstack-uploads
37
117
dnsPolicy : ClusterFirst
38
118
restartPolicy : Always
39
119
schedulerName : default-scheduler
40
120
terminationGracePeriodSeconds : 30
121
+ volumes :
122
+ - name : bookstack-storage
123
+ persistentVolumeClaim :
124
+ claimName : bookstack-storage
125
+ - name : bookstack-uploads
126
+ persistentVolumeClaim :
127
+ claimName : bookstack-uploads
41
128
triggers :
42
- - type : ConfigChange
129
+ - type : ConfigChange
130
+ - apiVersion : v1
131
+ kind : Service
132
+ metadata :
133
+ labels :
134
+ app : bookstack
135
+ template : bookstack
136
+ name : bookstack-db
137
+ spec :
138
+ selector :
139
+ deploymentconfig : bookstack-db
140
+ ports :
141
+ - name : 3306-tcp
142
+ port : 3306
143
+ protocol : TCP
144
+ targetPort : 3306
145
+ - apiVersion : v1
146
+ kind : Service
147
+ metadata :
148
+ labels :
149
+ app : bookstack
150
+ template : bookstack
151
+ name : bookstack
152
+ spec :
153
+ ports :
154
+ - name : 8080-tcp
155
+ port : 8080
156
+ protocol : TCP
157
+ targetPort : 8080
158
+ selector :
159
+ deploymentconfig : bookstack
160
+ sessionAffinity : None
161
+ type : ClusterIP
162
+ - apiVersion : route.openshift.io/v1
163
+ kind : Route
164
+ metadata :
165
+ labels :
166
+ app : bookstack
167
+ template : bookstack
168
+ name : bookstack
169
+ spec :
170
+ host : localhost
171
+ port :
172
+ targetPort : 8080-tcp
173
+ tls :
174
+ insecureEdgeTerminationPolicy : Redirect
175
+ termination : edge
176
+ to :
177
+ kind : Service
178
+ name : bookstack
179
+ weight : 100
180
+ wildcardPolicy : None
181
+
0 commit comments