Skip to content

Production-ready Docker Compose setup for self-hosted Metabase with a PostgreSQL backend. Includes management scripts (backup, update, restart) and a shared network config for easy integration.

License

Notifications You must be signed in to change notification settings

AiratTop/metabase-self-hosted

Metabase Self-Hosted with Docker

metabase

This repository provides a docker-compose setup to run a self-hosted Metabase instance with a PostgreSQL database as its application backend.

It's configured to connect to a shared Docker network, making it easy to integrate with other services.

Features

  • Uses the official Metabase and PostgreSQL Docker images.
  • The Metabase application database is persisted in a local volume.
  • Pre-configured for a shared network for easy inter-service communication.
  • Includes scripts for easy management (restart-docker.sh, update-docker.sh).
  • Includes a backup.sh script for backing up the PostgreSQL application database.

Getting Started

  1. Clone the repository:

    git clone https://github.com/AiratTop/metabase-self-hosted.git
    cd metabase-self-hosted
  2. Create the shared network: If you haven't already, create the shared Docker network. This allows Metabase to communicate with other services.

    docker network create shared_network
  3. Configure environment variables: Update a .env file and specify your PostgreSQL database credentials.

  4. Start the services:

    docker compose up -d
  5. Access Metabase: Once the containers are running, you can access the Metabase setup wizard in your browser at http://localhost:3000.

Usage

The repository includes several scripts to simplify management:

  • Start: docker compose up -d
  • Restart: ./restart-docker.sh
  • Update: ./update-docker.sh (Pulls the latest Docker images and restarts the services)
  • Backup: ./backup.sh (Creates a compressed backup of the PostgreSQL database in the backups directory)

See Also

Check out other self-hosted solutions:

License

This project is licensed under the MIT License - see the LICENSE file for details.


Author

AiratTop

About

Production-ready Docker Compose setup for self-hosted Metabase with a PostgreSQL backend. Includes management scripts (backup, update, restart) and a shared network config for easy integration.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Languages