Deploy Your App is designed to run entirely on infrastructure you control. This guide walks through cloning the repository, configuring all required environment variables, starting the backing services, and running every application process — either in development mode or in production via PM2.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/deploy-your-app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following available on your server:- Docker & Docker Compose — used to run PostgreSQL 16, Redis 7, and Caddy
- Bun 1.3+ (or Node.js 20+) — the primary runtime and package manager
- A domain name with DNS pointing to your server (a wildcard
Arecord, e.g.*.yourdomain.com, is recommended for subdomain routing) - Cloudflare R2 bucket — required for hosting static site deployments (Vite, Next.js static export)
- GitHub OAuth App — required for user sign-in and repository access
Setup
Configure Environment Variables
Each service reads its configuration from environment variables. Create Web App (
Builder Service (
API Service (
Proxy Service (
Worker Service (
Notification Service (
.env files in the relevant app directories as shown below.Web App (apps/web/.env)
Builder Service (apps/builder/.env)
API Service (apps/api/.env)
Proxy Service (apps/proxy/.env)
Worker Service (apps/worker/.env)
Notification Service (apps/nortification/.env)
GitHub OAuth App setup: Create a new OAuth App at github.com/settings/developers. Set the Authorization callback URL to:For example:
https://yourdomain.com/api/auth/callback/github. Copy the Client ID and Client Secret into your apps/web/.env.Start Infrastructure Services
Start PostgreSQL 16, Redis 7, and Caddy using Docker Compose:This starts three containers:
Caddy reads its configuration from For production, replace
| Container | Image | Port |
|---|---|---|
turbo-postgres | postgres:16 | 5432 |
turbo-redis | redis:7 | 6379 |
caddy-proxy | caddy:latest | 80, 443 |
Caddyfile at the project root and proxies all traffic on ports 80 and 443 to the proxy service running on host.docker.internal:8000:tls internal with your domain name to enable automatic Let’s Encrypt certificates.Run Database Migrations
Apply the Prisma schema to your PostgreSQL instance:This creates all required tables (users, accounts, projects, deployments, environment variables, etc.) in the
mydb database.Start All Services
Development Mode
From the monorepo root, start all services with hot-reloading:bun run docker:up && turbo dev, starting the infrastructure and all app dev servers concurrently via TurboRepo.Production Mode (PM2)
For production deployments, use the included PM2 configuration. PM2 manages all six services as named processes:ecosystem.config.cjs file defines the following processes:| PM2 Name | Directory | Port |
|---|---|---|
web | apps/web | 3000 |
api | apps/api | 8080 |
builder | apps/builder | — |
proxy | apps/proxy | 8000 |
worker | apps/worker | — |
nortification | apps/nortification | — |
Verifying Your Installation
Once all services are running, open your browser and navigate to your domain. You should see the Deploy Your App landing page. Click Sign in with GitHub to authorize and reach the dashboard. If the OAuth callback fails, double-check thatBETTER_AUTH_URL and the GitHub OAuth callback URL match exactly.
To stop all infrastructure containers: