forked from ocastastudios/docker-slamdata
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-advanced.sh
More file actions
executable file
·42 lines (34 loc) · 1.1 KB
/
run-advanced.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1.1 KB
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
#!/usr/bin/env bash
set -e
if [ ! -e /root/.config/quasar/quasar-config.json ]; then
echo >&2 'info: create quasar-config.json'
PORT="${PORT-8080}"
OIDC_ISSUER="${OIDC_ISSUER}"
OIDC_CLIENT_ID="${OIDC_CLIENT_ID}"
OIDC_NAME="${OIDC_NAME-OpenIDConnect}"
echo "
{
\"server\": {
\"port\": $PORT
},
\"authentication\": {
\"openid_providers\": [
{
\"issuer\": \"$OIDC_ISSUER\",
\"client_id\": \"$OIDC_CLIENT_ID\",
\"display_name\": \"$OIDC_NAME\"
}
]
}
}
" >> /root/.config/quasar/quasar-config.json
fi
set -e
# Initialise Advanced Metastore if required
if [ ! -e /root/.config/quasar/quasar-metastore.db.mv.db ]; then
[ -z "$ADMIN_GROUP" ] && { echo "Need to set ADMIN_GROUP"; exit 1; }
[ -z "$ADMIN_USERS" ] && { echo "Need to set ADMIN_USERS"; exit 1; }
java -jar /slamdata/quasar.jar bootstrap --admin-group $ADMIN_GROUP --admin-users $ADMIN_USERS
fi
export _JAVA_OPTIONS="${JAVA_OPTIONS:="-Xms1G -Xmx4G"} $SD_OPTS"
java -jar /slamdata/quasar.jar --content-path /slamdata/public