We have a Metabase instance configured to use PostgreSQL as its application database, and the metabase.env file contains the connection details as Linux environment variables. However, when calling the metabase.jar binary on CLI, e.g., by command java -jar metabase.jar version, it always refers to the default H2 database.
We wonder if there is a command-line option to let the binary run with configurations in the metabase.env file.
We are new to this part of Metabase usage, so we highly appreciate any hints and suggestions.
.env files are files that can be called from the code or from a container orchestrator. I would suggest you set the values in the env file as environment variables in the server rather than on a file.
BTW: are you a paid customer or trialing Metabase? if so, you have priority support via email and we can help you on this matter
Yes, @Luiggi, we made it work following your advice.
To make it work as Linux environment variables, we need to call the command export, e.g., export MB_DB_TYPE="postgres", and we will call source on the script file. On the other hand, the original metabase.env contains items without export, like MB_DB_TYPE="postgres". See more details in the screenshot below.
Also, we are trying to get familiar with the system before proceeding to a trial of the PRO version. In this case, not sure if we have the priority support.