Skip to main content

Documentation Index

Fetch the complete documentation index at: https://getfloo.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use this guide when your app needs a managed database or cache.

1. Provision The Services

floo services add postgres --app my-app
floo services add redis --app my-app
Both commands are idempotent — re-running is safe. Each provisions the underlying resource, injects the matching env vars into your app, and updates .floo/services.lock. Commit the lock file alongside other changes. For Postgres, both dev and prod credentials are provisioned up front. Dev reads a standard DATABASE_URL plus PGHOST, PGPORT, PGDATABASE, PGUSER, and PGPASSWORD for the _dev schema; prod gets a different role/password for the _prod schema. Redis is shared between dev and prod — see Managed Services → Dev and prod isolation. The default Postgres role allows 25 active connections — enough for most Cloud Run apps. If you sustainedly need more, email team@getfloo.com and we’ll provision a dedicated instance. The dashboard and floo db connections --app my-app show live usage.

2. Ship The First Deploy

floo preflight --json
floo apps github connect owner/repo --app my-app
floo deploys watch --app my-app
The first deploy bakes the env vars into the runtime. Subsequent deploys reuse the existing managed-service rows. For multi-service apps, attach the credentials to the services that need them:
[services.api.env]
managed = ["postgres", "redis"]

[services.web.env]
managed = []
floo preflight --json shows the exact per-service env plan in env_injection_plan.

3. Read The Injected Values

floo env list --app my-app
floo env get DATABASE_URL --app my-app
floo env get PGHOST --app my-app
floo env get REDIS_URL --app my-app
Use env list when you want masked visibility and env get when you need the plaintext value.

4. Consume Them In App Code

const databaseUrl = process.env.DATABASE_URL;
const redisUrl = process.env.REDIS_URL;
DATABASE_URL is intentionally a boring PostgreSQL URI (postgresql://user:password@host:port/database) so Rails/ActiveRecord, Django, SQLAlchemy, Prisma, pg, and libpq can consume it directly. The PG* vars are there for libraries or tools that prefer separate connection parameters.

5. Debug A Connection Issue

If the app is live but cannot reach its backing service:
floo logs --app my-app --error --since 30m
floo env get DATABASE_URL --app my-app
floo env get REDIS_URL --app my-app
floo redeploy --restart --app my-app
Check:
  • the managed services exist in floo services list
  • the service that needs the database has env.managed = ["postgres"]
  • DATABASE_URL, PGHOST, and REDIS_URL exist in floo env list
  • the app is using env vars instead of hard-coded local connection strings
  • runtime logs match the connection failure you expect

Managed Services Setup

Start from the exact floo services commands for managed services.

Environment Variables

See how injected values appear in the CLI and when to override them.