-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-entrypoint.sh
executable file
·32 lines (28 loc) · 891 Bytes
/
docker-entrypoint.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
#!/bin/sh
if test "$1" == "sample"; then
sauna sample
cat sauna-sample.yml
exit 0
elif test -f "sauna.yml"; then
echo 'Using existing configuration file /app/sauna.yml'
elif test ! -z "$SAUNA_CONFIG"; then
echo "Using environment var SAUNA_CONFIG"
echo $SAUNA_CONFIG | base64 -d > sauna.yml
else
echo "Cannot find configuration file sauna.yml, either:"
echo " - use a volume to put configuration in /app/sauna.yml"
echo " - use an environment var SAUNA_CONFIG"
echo ""
echo "Tip: you can get a sample of configuration with"
echo "docker run nicolaslm/sauna sample"
echo ""
echo "Tip: you can generate the SAUNA_CONFIG data with"
echo "base64 -w 0 sauna.yml"
exit 1
fi
echo ""
echo "List of active checks:"
sauna list-active-checks
echo ""
export SAUNA_LEVEL=${SAUNA_LEVEL:=warning}
exec sauna --level "$SAUNA_LEVEL" "$@"