1
0
Fork 0
mirror of https://github.com/Luzifer/nginx-sso.git synced 2024-10-18 07:34:22 +00:00
nginx-sso/docker-start.sh
Knut Ahlers a272b49cf8
Use multi-stage build to reduce image size
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-09-20 16:26:33 +02:00

17 lines
493 B
Bash
Executable file

#!/usr/local/bin/dumb-init /bin/bash
set -euo pipefail
# Copy frontend if not available
[ -d /data/frontend ] || cp -r /usr/local/share/nginx-sso/frontend /data/frontend
[ -e /data/config.yaml ] || {
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
}
echo "Starting nginx-sso"
exec /usr/local/bin/nginx-sso \
--config /data/config.yaml \
--frontend-dir /data/frontend \
$@