forked from baron/baron-sso
23 lines
520 B
Bash
Executable File
23 lines
520 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
APP_ENV_VALUE="${APP_ENV:-}"
|
|
|
|
case "$APP_ENV_VALUE" in
|
|
production|prod)
|
|
RULES_FILE="/etc/config/oathkeeper/rules.prod.json"
|
|
;;
|
|
stage|staging)
|
|
RULES_FILE="/etc/config/oathkeeper/rules.stage.json"
|
|
;;
|
|
*)
|
|
RULES_FILE="/etc/config/oathkeeper/rules.json"
|
|
;;
|
|
esac
|
|
|
|
export RULES_FILE
|
|
|
|
echo "[oathkeeper] APP_ENV=$APP_ENV_VALUE rules=$RULES_FILE"
|
|
|
|
exec /bin/sh -c "oathkeeper serve proxy -c /etc/config/oathkeeper/oathkeeper.yml 2>&1 | tee /var/log/oathkeeper/access.log"
|