TutorialFebruary 23, 20266 min read

Deploy a Database-Backed App Without Touching a Terminal

Every interesting app needs a database eventually. The annoying part has always been setting one up: provisioning a server, creating credentials, configuring connection strings, opening firewall ports. DartUp does all of that with a single word.

The One-Word Version

Claude Code

You: Deploy this app to DartUp with postgres

Deploying with database...

✓ PostgreSQL container created

✓ DATABASE_URL injected

✓ App deployed

Live at: https://my-app.dartup.dev

Your app gets a running Postgres instance and a connection URL, automatically.

How Sidecar Databases Work

When you deploy with a database, DartUp creates two containers: one for your app, one for the database. They run on the same internal network, so your app can connect instantly without any public exposure.

DartUp generates a random password, creates the database, and injects the connection URL as an environment variable. If you're using something like Prisma, SQLAlchemy, or any ORM that reads DATABASE_URL, it just works with zero config.

Supported Databases

PostgreSQL

The default for good reason. Use with Prisma, Drizzle, SQLAlchemy, ActiveRecord.

Env: DATABASE_URL=postgresql://dartup:pass@db:5432/myapp

MySQL

For apps that expect MySQL specifically. WordPress migrations, legacy systems.

Env: DATABASE_URL=mysql://dartup:pass@db:3306/myapp

Redis

For caching, sessions, job queues, or pub/sub. BullMQ, Celery, Sidekiq.

Env: REDIS_URL=redis://db:6379

MongoDB

Document storage. Works with Mongoose, Motor, the official drivers.

Env: MONGODB_URI=mongodb://dartup:pass@db:27017/myapp

Example: A Notes App with Postgres

Let's build something real. A simple notes API with full CRUD, backed by Postgres.

Claude Code

You: Build an Express API for a notes app

- CRUD endpoints: GET/POST/PUT/DELETE /notes

- Use Prisma with Postgres

- Include a simple HTML frontend

Creating notes app...

✓ Created Prisma schema with Note model

✓ Created Express API routes

✓ Created frontend with fetch calls

Claude Code

You: Deploy to DartUp with postgres

Deploying with PostgreSQL sidecar...

✓ PostgreSQL 16 container created

✓ Generated credentials

✓ DATABASE_URL injected

✓ Running Prisma migrations...

✓ App deployed

Live at: https://notes-app.dartup.dev

From "I want a notes app" to a live API with a real database in about two minutes. The data persists across redeployments. Add notes, redeploy your code, the notes are still there.

Example: A Python App with Redis

Redis is useful for more than just caching. Here's a job queue example:

Claude Code

You: Build a FastAPI app with a background job queue

- POST /jobs creates a job

- GET /jobs/:id returns status

- Use RQ (Redis Queue) for processing

Building...

✓ Created FastAPI endpoints

✓ Created worker with RQ

You: Deploy to DartUp with redis

Deploying with Redis sidecar...

✓ Redis container created

✓ REDIS_URL injected

✓ App deployed

Live at: https://job-queue.dartup.dev

Data Persistence

Database containers use persistent volumes. This means your data survives:

  • Code redeployments
  • Container restarts
  • Server maintenance

This is real storage, not ephemeral. When you redeploy your app with updated code, the database container keeps running with all its data intact.

When You Already Have an External Database

Maybe you already have a database on Supabase, PlanetScale, Neon, or AWS. You don't have to use DartUp's sidecar. Just pass the connection URL as an env variable:

Claude Code

You: Deploy to DartUp with this env var:

DATABASE_URL=postgres://user:pass@db.supabase.co:5432/mydb

DartUp is flexible about this. Use a sidecar when you want everything in one place, use an external database when you already have one set up.

Pricing note

Sidecar databases are a Pro feature ($29/month). The free tier can still connect to external databases, it just can't create sidecar containers. If you have a free Supabase or Neon instance, you can use DartUp's free tier with that database.

FAQ

What databases does DartUp support?

PostgreSQL, MySQL, Redis, and MongoDB. Each runs as a sidecar container on the same network as your app, with credentials auto-generated and injected.

Does my data persist across deployments?

Yes. Database containers use persistent volumes. Redeploying your app code doesn't touch the database. Your data stays intact.

Can I access the database directly?

The database isn't exposed to the public internet for security reasons. Your app connects through the internal Docker network. For direct access, you can deploy a database admin tool like pgAdmin alongside your app.

How much storage do I get?

Each database gets 1GB of persistent storage. For most applications — especially prototypes, tools, and side projects — that's plenty. If you need more, reach out to support.

Deploy your app with a database

Postgres, MySQL, Redis, or MongoDB. One word to add it. Zero config.