29 lines
635 B
Bash
Executable File
29 lines
635 B
Bash
Executable File
#!/bin/sh
|
|
|
|
OK=true
|
|
|
|
[ -n "$ORIGIN_URL" ] || unset OK
|
|
[ -n "$PROXY_URL" ] || unset OK
|
|
[ -n "$SSO_SECRET" ] || unset OK
|
|
[ -n "$SSO_URL" ] || unset OK
|
|
|
|
if [ -z "$OK" ]; then
|
|
cat - >&2 <<-EOF
|
|
#!/bin/sh
|
|
|
|
# you are going to need to set the following env vars and run
|
|
# the image like this
|
|
|
|
ORIGIN_URL=http://somesite.com
|
|
SSO_SECRET=somesecret
|
|
SSO_URL=http://someurl
|
|
HOST_PORT=3001
|
|
|
|
docker run -d --restart=always -e ORIGIN_URL=\$ORIGIN_URL -e PROXY_URL=http://0.0.0.0:80 -e SSO_SECRET=\$SSO_SECRET -e SSO_URL=\$SSO_URL -p \$HOST_PORT:80 discourse/discourse-auth-proxy
|
|
|
|
EOF
|
|
exit 1
|
|
fi
|
|
|
|
exec /usr/local/bin/discourse-auth-proxy
|