Databases
Flitzy runs PostgreSQL 16 and Redis 7.2 for you. Each database has its own 2 GB volume and is reachable only by your team’s apps, never from the internet.
-
Create it.
Terminal window flitzy db create shop-db --type postgres # or --type redisIt takes about a minute to become ready.
flitzy db listshows the status. -
Link it and deploy.
Terminal window flitzy deploy --link-db shop-dbThe app gets
DATABASE_URL(PostgreSQL) orREDIS_URL(Redis). The link is saved inflitzy.jsonunder"databases", so later deploys keep it. -
Use it.
import pg from 'pg';const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });
Agents do the same with create_database and deploy_app with databases: ["shop-db"]. In the dashboard it is the Databases tab.
Commands
Section titled “Commands”flitzy db list # status, linked apps, masked connection stringflitzy db link shop-cache shop # REDIS_URL into an existing app (restarts it)flitzy db link reports-db shop --env REPORTS_URL # a second database of the same typeflitzy db unlink shop-cache shopflitzy db url shop-db # the full connection stringflitzy db delete shop-cache --yes # deletes all dataflitzy db url shows the password, so it is recorded in the audit log.
What you get
Section titled “What you get”| PostgreSQL | Redis | |
|---|---|---|
| Version | 16 | 7.2 |
| Storage | 2 GB volume | 2 GB volume, AOF persistence |
| Memory | 256 MiB | 96 MB of data (128 MiB limit) |
| Connections | 40 | |
| Variable | DATABASE_URL |
REDIS_URL |
| Login | user app, database named after it (dashes become underscores) |
user default, password required |
SSL is off: traffic stays inside the cluster. If your driver insists on SSL, keep the ?sslmode=disable from the URL.
Redis does not evict keys when it is full: writes fail instead (noeviction), so nothing disappears silently. Set expiries on cache keys.
Good to know
Section titled “Good to know”- Connect with retries. After a deploy or a restart of the database, the first connection can fail for a few seconds. Most pools reconnect by themselves; make sure your app doesn’t exit on the first error.
- Names are global, like app names. A name someone else uses is taken.
- App and database must belong to the same team.
- Deleting an app leaves its databases alone. Deleting a database removes all its data, and linked apps lose the variable.
- Limit: 1 database on Free, 5 on Pro, per account or team.