-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
34 lines (27 loc) · 811 Bytes
/
deploy.sh
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
#!/usr/bin/env bash
if [[ ! -f config/config.yml ]]; then
echo "Copy config/default.yml to config/config.yml and adjust values for your installation."
exit
fi
if [[ -z "${ADMIN_EMAIL}" ]]; then
echo "ADMIN_EMAIL must be set."
exit
fi
HOST=${HOST:-}
LETSENCRYPT_ENABLED=${LETSENCRYPT_ENABLED:-false}
function create() {
oc process -f $1 --ignore-unknown-parameters \
WIKI_ADMIN_EMAIL="${ADMIN_EMAIL}" \
HOST="${HOST}" \
LETSENCRYPT_ENABLED="${LETSENCRYPT_ENABLED}" \
| oc create -f -
}
oc create configmap wikijs-config --from-file config/config.yml
create secrets.yml
create mongodb.yml
create wikijs.yml
create route.yml
if [[ -z "${HOST}" ]]; then
HOST=$(oc get route wikijs | awk '/wikijs.*/ {print $2}')
oc set env dc/wikijs WIKIJS_HOST="https://${HOST}"
fi