Most TensorZero deployments will not require Postgres.
Deploy
You can self-host Postgres or use a managed service (e.g. AWS RDS, Supabase, PlanetScale). Follow the deployment instructions for your chosen service. Internally, we test TensorZero using self-hosted Postgres 14.If you find any compatibility issues, please open a detailed GitHub Discussion.
Configure
Connect to Postgres
To configure TensorZero to use Postgres, set theTENSORZERO_POSTGRES_URL
environment variable with your Postgres connection details.
.env
Apply Postgres migrations
Unlike with ClickHouse, TensorZero does not automatically apply Postgres migrations. You must apply migrations manually withgateway --run-postgres-migrations
.
- Docker Compose
- Docker
If you’ve configured the gateway with Docker Compose, you can run the migrations with:See Deploy the TensorZero Gateway for more details.