2021-11-21 23:28:22 +00:00
|
|
|
#!/usr/bin/dumb-init /bin/bash
|
2018-01-28 17:43:58 +00:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
# Copy frontend if not available
|
2023-07-29 14:59:05 +00:00
|
|
|
[ -f /data/frontend/index.html ] || cp -r /usr/local/share/nginx-sso/frontend /data/
|
2018-01-28 17:43:58 +00:00
|
|
|
|
|
|
|
[ -e /data/config.yaml ] || {
|
2022-12-20 23:59:07 +00:00
|
|
|
cp /usr/local/share/nginx-sso/config.yaml /data/config.yaml
|
|
|
|
echo "An example configuration was copied to /data/config.yaml - You want to edit that one!"
|
|
|
|
exit 1
|
2018-01-28 17:43:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "Starting nginx-sso"
|
2018-09-20 14:26:33 +00:00
|
|
|
exec /usr/local/bin/nginx-sso \
|
2022-12-20 23:59:07 +00:00
|
|
|
--config /data/config.yaml \
|
|
|
|
--frontend-dir /data/frontend \
|
|
|
|
$@
|