Docker-first self-hosted deployment platform MVP.
Running Cadsploy itself on a VPS (not local dev)? See DEPLOY.md.
apps/web: Next.js dashboardapps/api: Fastify API, GitHub OAuth, Prisma, BullMQapps/worker: deploy worker, Git clone, Docker/Nixpacks build, container runtime, Caddyfile generation- PostgreSQL + Redis via Docker Compose
cp .env.example .env
npm install
npm run prisma:generate
docker compose up -d
npm run prisma:migrate
npm run devOpen http://localhost:3000.
- Docker Engine
- Git
- Nixpacks, only if using auto-detect mode
- Caddy, if you want generated reverse proxy config to be reloaded
Create the Docker network once, or let worker create it:
docker network create cadsploy-netCreate a GitHub OAuth App and set:
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GITHUB_CALLBACK_URL=http://localhost:4000/auth/github/callback
GITHUB_WEBHOOK_SECRET=change-me-to-a-random-webhook-secret
PUBLIC_APP_URL=http://localhost:3000
API_URL=http://localhost:4000
NEXT_PUBLIC_API_URL=http://localhost:4000When a project is created, Cadsploy tries to register a GitHub push webhook for that repository. Pushes to the configured branch trigger a new deployment automatically.
For local development, GitHub cannot deliver webhooks to localhost; expose the API with a tunnel such as ngrok/Cloudflare Tunnel and set API_URL plus GITHUB_CALLBACK_URL to the public HTTPS URL.
Migrations live in apps/api/prisma/migrations and are tracked in git — every clone/deploy target needs the same history to reach the same schema.
-
Schema changes must go through
npm run prisma:migrate(prisma migrate dev), which writes a new migration file. Do not useprisma db pushfor anything you intend to ship — it edits the database without leaving a migration behind, so other environments silently drift out of sync. -
To apply existing migrations to a fresh database (new environment, CI, first deploy on a server), run:
npx prisma migrate deploy --schema apps/api/prisma/schema.prisma
-
CI runs
migrate deployagainst a throwaway Postgres on every push, so a broken or missing migration fails the build before it reaches a server.
- Login with GitHub.
- Import repository.
- Choose branch, build method, and app port.
- Click Deploy.
- Worker clones repo, builds Docker image, runs container, writes generated Caddyfile.
- Dashboard shows build/runtime logs.
- Secrets are encrypted with
ENCRYPTION_KEYusing AES-256-GCM. - API endpoints enforce ownership checks.
- Containers run with CPU/RAM limits and
no-new-privileges. - This is an MVP scaffold; run it first in a private VPS/local lab before opening public access.