Skip to content

Docker Compose

Install Supermetry with generated or repository Docker Compose files.

Run Supermetry and PostgreSQL together with Docker Compose.

  1. Download the installer and choose whether to download the release image or build it locally:

    Terminal window
    curl -fsSLO https://github.com/velixio/supermetry/releases/latest/download/install.sh
    sh install.sh --yes --mode docker --base-url https://analytics.example.com --listen 127.0.0.1:8787 --proxy none --image download --dir /opt/supermetry

    Replace --image download with --image build to fetch the release source and build the image locally.

    Add --dry-run to print the files, docker compose commands and proxy changes the installer would make, without changing anything.

  2. Open https://analytics.example.com/app and create the admin account.

What you should see: the supermetry and postgres services are running and the installer prints the dashboard URL.

  1. Clone the release source and create the environment file:

    Terminal window
    git clone https://github.com/velixio/supermetry.git
    cd supermetry
    cp .env.example .env
    secret_key="$(openssl rand -base64 32)"
    postgres_password="$(openssl rand -base64 32)"
    sed -i.bak "s|^SUPERMETRY_BASE_URL=.*|SUPERMETRY_BASE_URL=http://localhost:8787|; s|^SUPERMETRY_SECRET_KEY=.*|SUPERMETRY_SECRET_KEY=${secret_key}|" .env
    printf '\nPOSTGRES_PASSWORD=%s\n' "$postgres_password" >> .env
  2. Start Supermetry with the bundled postgres:18-alpine service:

    Terminal window
    docker compose -f deploy/docker-compose.yml --profile bundled-db up -d --build

    To use an external PostgreSQL database instead, set SUPERMETRY_DATABASE_URL in .env and run:

    Terminal window
    docker compose -f deploy/docker-compose.yml up -d --build

What you should see: docker compose -f deploy/docker-compose.yml ps shows the application running on 127.0.0.1:8787.