A metabase application that runs on postgreSQL and docker compose
- star 数
- 58
- watcher 数
- 3
- fork 数
- 32
- issue 数
- 0
- 最終更新
- 2023/04/05
A metabase application that runs on postgreSQL and docker compose
Then Jesus went about all cities and villages, teaching in their synagogues, preaching the gospel of the kingdom, healing every sickness and every disease among the people.
But when He saw the multitudes, He was moved with compassion for them, because they were weary and scattered, like sheep having no shepherd.
Metabase is an open-source java-based software that enables users to analyse data from a range of data sources including relational databases (e.g. Postgresql, MySQL etc.), NoSql databases etc.
It can be quite helpful when one has a data science question that could easily be answered by data analysis.
By default, it stores application-specific data e.g. users, stored queries, configurations etc. on an H2 database on the same file system where it is installed.
However, it is difficult to retrieve this data once the application crushes (which it might do if you write a wrong sql query for it to run on your data). It is therefore usually better to have the application save the data in a postgreSQL database such that it recovers its original state after any crush.
| Technology | Usage |
|---|---|
| Docker | metabase and postgres run in different Docker containers |
| Docker Compose | Docker compose netwroks the different Docker containers to allow them work together as dependent services |
| Metabase | SQL based Analysis and Visualization program for any database |
| Postgres | A database engine that stores relational data in a persistent way |
This assumes the local machine is running on Ubuntu
Ensure docker is installed. If it is not installed, install it. Here are the instructions.
Ensure docker compose is installed on your system. If it is not installed, install it. Here are the instructions.
Clone this git repository
git clone https://github.com/Tinitto/compose-postgres-metabase.git
Enter the compose-postgres-metabase folder
cd compose-postgres-metabaseConvert config/metabase_database.env.example to config/metabase_database.env.
Update the environment variables MB_DB_PASS, MB_ENCRYPTION_SECRET_KEY and save.
MB_DB_PASS=<put_here_the_password_for_the_metabase_user> MB_ENCRYPTION_SECRET_KEY=<Add a random string here as the secret>
Convert config/postgres.env.example to config/postgres.env.
Update the environment variables POSTGRES_PASSWORD, METABASE_PASSWORD and save.
POSTGRES_PASSWORD=<put_here_the_password_for_the_postgres_user> METABASE_PASSWORD=<put_here_the_password_for_the_metabase_user>
Start the docker compose services
sudo docker-compose up -d
Set up your metabase instance by visiting the local metabase start URL
If you are on a server, use http://<server IP>:3000.
| Service | Port |
|---|---|
| Metabase | 3000 |
| Postgres | 54320 |
Contributions are welcome.
Please first take a look at the CONTRIBUTIONS GUIDELINES.
Copyright (c) 2019 Martin Ahindura
Licensed under the MIT License
Some of the configuration was learnt from the Beyond Jupyter talk by Joshua Gorner