Hi there,
I haven’t found an answer to this question yet, and it may be very simple.
I’m just curious if you follow the guide for “Running Metabase on Elastic Beanstalk”, including the recommendation to set up an RDS Postgres database (https://metabase.com/docs/latest/operations-guide/running-metabase-on-elastic-beanstalk.html#configuring-rds-for-metabase), does Metabase then default to using Postgres? Or does that configuration just spin up an RDS Database on EB and you must still manually connect Metabase to use Postgres as the application database?
If it automatically connects to the Postgres DB through EB, then I’m curious how it does that.
If you must still manually connect it, I would suggest the guide include the recommended way to set up the environment variables so that docker can find the Postgres DB.
Thanks for your time and insight - so far Metabase has been insanely valuable to our organization!!
Hi @stephen.richter
Looking at the Docker script, when RDS_HOSTNAME
is defined, then it automatically uses the RDS configuration to setup the Postgres connection:
https://github.com/metabase/metabase/blob/master/bin/docker/run_metabase.sh
1 Like
Thanks @flamber… that pointed me in the right direction.
Just to confirm I was running Metabase using Postgres on RDS and not the default H2, I found these helpful steps from @pjatx to view the value on RDS_HOSTNAME:
- SSH into the metabase EC2 instance
- Switch to root
sudo -s
- See which docker container is running
docker ps -a
- Grab your LONG container ID by typing
docker inspect {CONTAINER ID}
Paste this somewhere you can reference. It should be the first key: value when you invoke the inspect command
- Find the docker container config file
cd /var/lib/docker/containers/{container-name}/
- Open up config.v2.json with nano, VIM, or your editor of choice
nano config.v2.json
- Find the
RDS_HOSTNAME
key:value in the setting file
You should see something like “RDS_HOSTNAME=jfadlsfj23jklasd.c0asdfappmfle.us-east-1.rds.amazonaws.com”, along with key:values for RDS_USERNAME and RDS_DB_NAME that you set by following the recommended set up in the Installation Guide on AWS.
Appreciate the help!
2 Likes