Deploy with Docker
Select Docker during generation:
npx create-launchframe my-app --deploy-target dockerThis adds a production-optimized Dockerfile and .dockerignore.
Build
docker build -t my-saas .Run
docker run -p 3000:3000 --env-file .env.local my-saasDocker Compose
For local development with PostgreSQL:
# docker-compose.yml
services:
app:
build: .
ports:
- '3000:3000'
env_file: .env.local
depends_on:
- db
db:
image: postgres:17-alpine
environment:
POSTGRES_DB: my_saas
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:docker compose upDeploy to a VPS
- Build and push the image to your registry
- Pull and run on your server (or use Coolify, CapRover, etc.)
- Set environment variables on the host
- Run database migrations:
docker exec -it my-saas pnpm db:push