Deploy Your First App
1. Deploy
From the dashboard choose New project → Upload folder and pick your project. Or, from a terminal:
cd my-app
fastbase deploy
node_modules, build output, .git and real .env files are never uploaded. .env.example is, because FASTBASE reads it to learn which settings your app expects.
2. What happens
Each deployment moves through these stages, and each is recorded with a timestamp and its log:
| Stage | What FASTBASE does |
|---|---|
| Receiving source | Unpacks the upload into an isolated release |
| Analyzing | Detects framework, package manager, commands, database, storage, variables |
| Provisioning | Creates the database, generates secrets, assembles the environment |
| Building | Installs dependencies and runs the build |
| Deploying | Runs database migrations |
| Starting | Starts the new version next to the current one |
| Health check | Waits for a healthy HTTP response |
| Live | Moves traffic to the new version, then stops the old one |
A version only becomes Live after the health check passes. If anything fails earlier, the previous version keeps serving traffic and the failed one is discarded.
3. If the app needs a database
When FASTBASE sees Prisma, Drizzle, TypeORM, Knex, pg, or a DATABASE_URL in .env.example, it creates a PostgreSQL database and injects DATABASE_URL.
Migrations run before the new version receives traffic. FASTBASE picks, in order:
- A
fastbase:migrate,db:migrate,migrateormigration:runscript inpackage.json prisma migrate deploy(orprisma db pushwhen there is no migrations folder)drizzle-kit migrateknex migrate:latest
If migrations fail, the deployment fails and nothing is promoted.
4. If a value is missing
Settings that only you can know — a Stripe key, an OpenAI key — block the deployment with a clear list instead of a crash at runtime:
This app needs a value only you can provide: STRIPE_SECRET_KEY.
Provide it with fastbase deploy --env STRIPE_SECRET_KEY=…, --env-file .env, or under Environment in the dashboard. Mark a variable optional by writing # optional above it in .env.example.
5. Redeploy and roll back
- Redeploy rebuilds the same source with the current environment variables.
- Restore last working version (
fastbase rollback) starts a previous release exactly as it ran — same build, same configuration, no rebuild. The last five releases per environment are kept for this.
Rolling back never changes database contents. That is a separate, explicit backup restore.
6. Preview deployments
fastbase deploy --preview
Staging works the same way: fastbase deploy --environment staging.
A preview gets its own address (<project>--<deployment-id>.<domain>), its own environment variables and its own database, and does not touch production.
Background workers
An app that also runs a queue consumer, a scheduler or any other long-running process next to the web server can declare it in a Procfile at the project root:
web: node server.js
worker: node worker.js
FASTBASE starts the worker line as a second process of every deployment: same release, same environment variables, no PORT. It is restarted with backoff if it crashes, and a crashing worker never takes the web process offline. The same command can be set under Settings → Build and start → Worker command, which wins over the Procfile. Worker output appears in the runtime log prefixed with [worker].
Health checks
FASTBASE requests / and treats any response below HTTP 500 as healthy. Change the path under Settings → Advanced → Health check path. Your server must listen on the PORT environment variable.