Query Engines
Deploy
Local

Deploy Vizzly on Docker (Docker compose)

One option for running the Vizzly query engine locally is to add a service to a docker-compose.yml file.

Firstly, lets be sure you have all the values needed for the following environment variables;

VIZZLY_CLIENT

One of 'bigquery', 'mariadb', 'postgres', 'snowflake', 'mysql'.

VIZZLY_PROJECT_ID

This can be found on your project settings page on your Vizzly account.

VIZZLY_ENCRYPTION_KEY

This should be kept the same for a project. If you do not have one, you can generate one by running the vizzly encryption-key CLI command.

VIZZLY_PUBLIC_KEYS

Once generated with the vizzly create-key-pair CLI command, you can format your public key using the vizzly format-public-pem-for-env CLI command.

docker-compose.yml

Your docker compose file will then look like this:

version: '3.1'

services:
  vizzly:
    image: ghcr.io/vizzly-co/query-engine:latest
    platform: linux/amd64
    ports:
      - 8000:8000
    env_file:
      - vizzly.env

vizzly.env

The vizzly.env file is where you will keep the environment variables, which is referenced by the above docker-compose.yml file;

VIZZLY_CLIENT=<< your value>>
VIZZLY_ENCRYPTION_KEY=<< your value>>
VIZZLY_PROJECT_ID=<< your value>>
VIZZLY_PUBLIC_KEYS=<< your value>>

Connecting to the database

Assuming the ports have not been changed in the above docker-compose.yml file, the Vizzly Query Engine is now available at http://0.0.0.0:8000 (opens in a new tab).

You can then access the /connect (opens in a new tab) endpoint and enter the database connection credentials.

Once connected, you can run the vizzly config-manager CLI command to open the config manager. Be sure to point the command to your private key using the --private-key flag, by default it will look for vizzly-private.pem in your current directory.

Verifying the setup

To check the query engine has been setup correctly, you can visit the /status (opens in a new tab) endpoint.