Skip to content
Snippets Groups Projects
Commit 5e680769 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

support RDS environment variables in our bin/start script

parent 59a316f9
Branches
Tags
No related merge requests found
......@@ -19,4 +19,21 @@ if [ "$MAILGUN_SMTP_LOGIN" ]; then
export MB_EMAIL_SMTP_PASSWORD="$MAILGUN_SMTP_PASSWORD"
fi
# AWS Elastic Beanstalk w/ RDS
if [ ! -z "$RDS_HOSTNAME" ]; then
# EEK: this is a bit fragile. if user picks a non-standard port for their db we are screwed :(
if [ "$RDS_PORT" == "3306" ]; then
export MB_DB_TYPE=mysql
else
export MB_DB_TYPE=postgres
fi
export MB_DB_DBNAME=$RDS_DB_NAME
export MB_DB_USER=$RDS_USERNAME
export MB_DB_PASS=$RDS_PASSWORD
export MB_DB_HOST=$RDS_HOSTNAME
export MB_DB_PORT=$RDS_PORT
fi
exec java $JAVA_OPTS -jar ./target/uberjar/metabase.jar
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment