Launchframe

Deploy with Docker

Select Docker during generation:

npx create-launchframe my-app --deploy-target docker

This adds a production-optimized Dockerfile and .dockerignore.

Build

docker build -t my-saas .

Run

docker run -p 3000:3000 --env-file .env.local my-saas

Docker 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 up

Deploy to a VPS

  1. Build and push the image to your registry
  2. Pull and run on your server (or use Coolify, CapRover, etc.)
  3. Set environment variables on the host
  4. Run database migrations:
docker exec -it my-saas pnpm db:push