Skip to content

Auto Wired Services on Varity

Varity Team Core Contributors Updated June 2026

When you deploy with Varity, the platform reads your package.json or requirements.txt and automatically provisions the databases and services your app depends on. You do not write any configuration files.

The services start alongside your app when you deploy. No extra steps needed.

Varity scans your dependency files for known packages and maps them to services:

  1. You add a database library to your project (for example, pg or mongoose)
  2. You deploy with varitykit app deploy
  3. Varity detects the library and starts the matching service automatically
  4. Your app receives the connection URL as an environment variable

You do not configure ports, credentials, or connection strings. Varity handles all of that.

DependencyService ProvisionedEnvironment Variable Injected
pgPostgres databaseDATABASE_URL
@prisma/clientPostgres databaseDATABASE_URL
drizzle-ormPostgres databaseDATABASE_URL
postgresPostgres databaseDATABASE_URL
ioredisRedis cacheREDIS_URL
redisRedis cacheREDIS_URL
@vercel/kvRedis cacheREDIS_URL
@langchain/ollamaAI model serverOLLAMA_URL
ollamaAI model serverOLLAMA_URL
mongooseMongoDB databaseMONGODB_URI
mongodbMongoDB databaseMONGODB_URI
mysqlMySQL databaseMYSQL_URL
mysql2MySQL databaseMYSQL_URL
@aws-sdk/client-s3Object storage (S3-compatible)MINIO_URL, MINIO_ACCESS_KEY, MINIO_SECRET_KEY
DependencyService ProvisionedEnvironment Variable Injected
psycopgPostgres databaseDATABASE_URL
psycopg2Postgres databaseDATABASE_URL
psycopg2-binaryPostgres databaseDATABASE_URL
asyncpgPostgres databaseDATABASE_URL
redisRedis cacheREDIS_URL
ollamaAI model serverOLLAMA_URL
pymongoMongoDB databaseMONGODB_URI
pymysqlMySQL databaseMYSQL_URL
boto3Object storage (S3-compatible)MINIO_URL, MINIO_ACCESS_KEY, MINIO_SECRET_KEY
minioObject storage (S3-compatible)MINIO_URL, MINIO_ACCESS_KEY, MINIO_SECRET_KEY

If your project includes a prisma/schema.prisma file, Varity reads the datasource block to confirm which database to provision:

provider valueService Provisioned
postgresqlPostgres database
mongodbMongoDB database

Postgres Database

A relational database for structured data. Includes vector extension support, which means you can store and query embeddings for AI features without any additional setup.

Your app receives DATABASE_URL automatically.

Redis Cache

An in-memory key-value store for caching, sessions, and queues. Ideal for rate limiting, temporary data, and speeding up repeated queries.

Your app receives REDIS_URL automatically.

AI Model Server

A local model runtime so your app can run language models without calling an external API. Useful for apps with on-device inference or privacy requirements.

Your app receives OLLAMA_URL automatically.

MongoDB Database

A document database for flexible, schema-optional data. Good for apps where data shape varies across records.

Your app receives MONGODB_URI automatically.

MySQL Database

A relational database for apps and frameworks that expect MySQL. Auto-provisioned alongside your app when a MySQL client is in your dependencies.

Your app receives MYSQL_URL automatically.

Object Storage

Object storage for files, uploads, and assets. Use it with an S3-compatible SDK or MinIO client. No separate bucket to provision. Auto-wired when your dependencies include an S3 client (@aws-sdk/client-s3, boto3, or minio).

Your app receives MINIO_URL, MINIO_ACCESS_KEY, and MINIO_SECRET_KEY automatically.

If your package.json contains:

{
"dependencies": {
"next": "^14.0.0",
"@prisma/client": "^5.0.0"
}
}

Running varitykit app deploy will:

  1. Detect Next.js as the framework
  2. Detect @prisma/client and provision a Postgres database
  3. Inject DATABASE_URL into your app’s runtime environment
  4. Start both your app and the database together

Your Prisma client will connect automatically using the injected URL.

Example: FastAPI App with Redis and MongoDB

Section titled “Example: FastAPI App with Redis and MongoDB”

If your requirements.txt contains:

fastapi
redis
pymongo

Running varitykit app deploy will:

  1. Detect FastAPI as the framework
  2. Detect redis and provision a Redis cache
  3. Detect pymongo and provision a MongoDB database
  4. Inject REDIS_URL and MONGODB_URI into your runtime environment

Your app code reads these variables the same way it would in any environment:

Next.js / Node.js
const db = new PrismaClient({
datasources: { db: { url: process.env.DATABASE_URL } }
});
Python (FastAPI)
import os
from motor.motor_asyncio import AsyncIOMotorClient
client = AsyncIOMotorClient(os.environ["MONGODB_URI"])

The object store speaks the S3 protocol, so point any S3 client at the injected endpoint and credentials:

Object storage (boto3)
import os
import boto3
s3 = boto3.client(
"s3",
endpoint_url=os.environ["MINIO_URL"],
aws_access_key_id=os.environ["MINIO_ACCESS_KEY"],
aws_secret_access_key=os.environ["MINIO_SECRET_KEY"],
)

You do not need to add these variables to .env files yourself. Varity injects them at deploy time.