-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwikijs.yml
151 lines (147 loc) · 3.64 KB
/
wikijs.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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
apiVersion: v1
kind: Template
labels:
app: wikijs
template: wikijs
metadata:
name: wikijs
template.openshift.io/bindable: "false"
parameters:
- displaName: Name
name: NAME
required: true
value: wikijs
- description: Database volume capacity
displayName: Volume Capacity
name: VOLUME_CAPACITY
required: true
value: 5Gi
- name: VOLUME_PATH
value: '/vol'
- name: WIKI_ADMIN_EMAIL
required: true
- name: HOST
value: null
objects:
- apiVersion: v1
kind: Service
metadata:
name: ${NAME}
spec:
ports:
- name: wikijs
port: 3000
protocol: TCP
targetPort: 3000
selector:
deploymentconfig: ${NAME}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ${NAME}-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: ${VOLUME_CAPACITY}
- apiVersion: v1
kind: ImageStream
metadata:
name: ${NAME}
- apiVersion: v1
kind: BuildConfig
metadata:
name: ${NAME}
spec:
output:
to:
kind: ImageStreamTag
name: ${NAME}:latest
postCommit: {}
runPolicy: Serial
source:
type: Binary
strategy:
dockerStrategy: {}
triggers:
- imageChange: {}
type: ImageChange
- type: ConfigChange
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${NAME}
spec:
replicas: 1
selector:
deploymentconfig: ${NAME}
strategy:
type: Recreate
template:
metadata:
labels:
app: ${NAME}
deploymentconfig: ${NAME}
spec:
containers:
- env:
- name: WIKI_ADMIN_EMAIL
value: ${WIKI_ADMIN_EMAIL}
- name: WIKIJS_HOST
value: https://${HOST}
- name: WIKIJS_PORT
value: '3000'
- name: WIKIJS_PATHS_DATA
value: '${VOLUME_PATH}/data'
- name: WIKIJS_PATHS_REPO
value: '${VOLUME_PATH}/repo'
- name: WIKIJS_SESSION_SECRET
valueFrom:
secretKeyRef:
key: session-secret
name: ${NAME}-db
- name: MONGODB_USER
valueFrom:
secretKeyRef:
key: database-user
name: ${NAME}-db
- name: MONGODB_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: ${NAME}-db
- name: MONGODB_DATABASE
valueFrom:
secretKeyRef:
key: database-name
name: ${NAME}-db
name: ${NAME}
ports:
- containerPort: 3000
protocol: TCP
volumeMounts:
- mountPath: ${VOLUME_PATH}
name: ${NAME}-data
- mountPath: /var/wiki/config
name: ${NAME}-config
restartPolicy: always
volumes:
- name: ${NAME}-data
persistentVolumeClaim:
claimName: ${NAME}-data
- name: ${NAME}-config
configMap:
name: ${NAME}-config
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${NAME}
from:
kind: ImageStreamTag
name: ${NAME}:latest
type: ImageChange
- type: ConfigChange