mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 00:47:50 +01:00
Support POSTHOG_REDIS_* vars in bin/plugin-server (#3426)
This commit is contained in:
parent
3785628796
commit
e3ee1a37ca
@ -22,8 +22,13 @@ while test $# -gt 0; do
|
||||
done
|
||||
|
||||
if [[ -n $POSTHOG_DB_NAME ]]; then
|
||||
[[ -n $POSTHOG_DB_PASSWORD ]] && PASSWORD_COMPONENT=":$POSTHOG_DB_PASSWORD"
|
||||
export DATABASE_URL="postgres://${POSTHOG_DB_USER:-"postgres"}${PASSWORD_COMPONENT}@${POSTHOG_POSTGRES_HOST:-"localhost"}:${POSTHOG_POSTGRES_PORT:-"5432"}/${POSTHOG_DB_NAME}"
|
||||
[[ -n $POSTHOG_DB_PASSWORD ]] && DB_PASSWORD_COMPONENT=":$POSTHOG_DB_PASSWORD"
|
||||
export DATABASE_URL="postgres://${POSTHOG_DB_USER:-"postgres"}${DB_PASSWORD_COMPONENT}@${POSTHOG_POSTGRES_HOST:-"localhost"}:${POSTHOG_POSTGRES_PORT:-"5432"}/${POSTHOG_DB_NAME}"
|
||||
fi
|
||||
|
||||
if [[ -z $REDIS_URL ]]; then
|
||||
[[ -n $POSTHOG_REDIS_PASSWORD ]] && REDIS_PASSWORD_COMPONENT="$POSTHOG_REDIS_PASSWORD@"
|
||||
export REDIS_URL="redis://${REDIS_PASSWORD_COMPONENT}${POSTHOG_REDIS_HOST:-"localhost"}:${POSTHOG_REDIS_PORT:-"6379"}/"
|
||||
fi
|
||||
|
||||
export BASE_DIR=$(dirname $(dirname "$PWD/${0#./}"))
|
||||
|
Loading…
Reference in New Issue
Block a user