| name | scaffold-deploy |
| description | Generate deployment configuration files (Dockerfile, vercel.json, wrangler.toml, etc.) based on target type. |
| type | scaffold |
| project_types | ["web-app","api","library","cli","tui"] |
| trigger | setup deploy, create CI/CD, dockerize, deploy config |
| inputs | [{"name":"target","description":"Deployment target (docker, vercel, railway, fly, aws, gcp, custom)","required":false,"default":"docker"},{"name":"ci_provider","description":"CI/CD provider (github-actions, gitlab-ci, custom)","required":false,"default":"github-actions"}] |
Context
Project {{project_name}} ({{project_type}}) uses {{stack}}.
Setup deployment to {{input.target}} with CI/CD via {{input.ci_provider}}.
Instructions
-
Create Dockerfile (if target = docker, railway, fly, aws, gcp)
- Multi-stage build (builder + runner)
- Non-root user
- Minimal image size (alpine if possible)
- Proper .dockerignore
- Health check endpoint
-
Create docker-compose.yml (for local development)
- App service
- Database service (if applicable)
- Redis service (if applicable)
- Volume mounts for development
- Environment variables from .env
-
Create CI/CD pipeline
GitHub Actions:
.github/workflows/
├── ci.yml # Run on PR: lint, typecheck, test
├── deploy.yml # Run on push to main: build, deploy
└── release.yml # Run on tag (library only): publish
GitLab CI:
.gitlab-ci.yml # stages: test, build, deploy
-
Create environment configs
.env.example (template, committed)
- Document required env vars
- Separation: development, staging, production
-
Platform-specific config:
- Vercel:
vercel.json
- Railway:
railway.toml
- Fly.io:
fly.toml
- Library: npm publish config in package.json
Script
#!/bin/bash
mkdir -p .github/workflows 2>/dev/null
if [ "{{input.target}}" != "vercel" ]; then
cat > .dockerignore << 'DOCKERIGNORE'
node_modules
.git
.env
.env.local
dist
coverage
.next
DOCKERIGNORE
echo "Created .dockerignore"
fi
Validation