replit-deploy-integration
Deploy Replit apps with Autoscale, Reserved VM, and Static deployment types. Use when deploying to production, configuring deployment settings, setting up custom domains, or managing deployment secrets and health checks. Trigger with phrases like "deploy replit", "replit deployment", "replit autoscale", "replit reserved VM", "replit static deploy", "replit custom domain".
What this skill does
# Replit Deploy Integration
## Overview
Deploy applications on Replit's hosting platform. Three deployment types: Static (free, frontend-only), Autoscale (scales to zero, pay per request), and Reserved VM (always-on, fixed cost). Includes custom domain setup, health checks, rollbacks, and deployment monitoring.
## Prerequisites
- Replit Core, Pro, or Teams plan (deployment access)
- Application working in Workspace ("Run" button)
- Custom domain (optional) with DNS access
## Deployment Types
| Type | Best For | Pricing | Scale |
|------|----------|---------|-------|
| **Static** | HTML/CSS/JS frontends | Free | CDN-backed, auto-cached |
| **Autoscale** | Variable traffic APIs | Per request | 0 to N instances |
| **Reserved VM** | Always-on services | $0.20+/day | Fixed resources |
## Instructions
### Step 1: Configure `.replit` for Deployment
```toml
# .replit — Autoscale deployment (most common)
entrypoint = "src/index.ts"
run = "npx tsx src/index.ts"
[nix]
channel = "stable-24_05"
[env]
NODE_ENV = "production"
[deployment]
run = ["sh", "-c", "npx tsx src/index.ts"]
build = ["sh", "-c", "npm ci --production && npm run build"]
deploymentTarget = "autoscale"
```
**Reserved VM:**
```toml
[deployment]
run = ["sh", "-c", "node dist/index.js"]
build = ["sh", "-c", "npm ci && npm run build"]
deploymentTarget = "cloudrun"
```
**Static:**
```toml
[deployment]
deploymentTarget = "static"
publicDir = "dist"
build = ["sh", "-c", "npm ci && npm run build"]
```
### Step 2: Configure Secrets for Production
```markdown
Workspace Secrets auto-sync to Deployments (2025+).
1. Click lock icon (Secrets) in sidebar
2. Add production secrets:
- DATABASE_URL (auto-populated by Replit PostgreSQL)
- API_KEY, JWT_SECRET, etc.
3. Verify in Deployment Settings > Environment Variables
```
### Step 3: Add Health Check Endpoint
Replit monitors your deployment via health checks. Always include one:
```typescript
// src/routes/health.ts
import { Router } from 'express';
import { pool } from '../services/db';
const router = Router();
router.get('/health', async (req, res) => {
const checks: Record<string, any> = {
status: 'ok',
uptime: process.uptime(),
timestamp: new Date().toISOString(),
};
// Check database if configured
if (process.env.DATABASE_URL) {
try {
await pool.query('SELECT 1');
checks.database = 'connected';
} catch {
checks.database = 'disconnected';
checks.status = 'degraded';
}
}
// Replit-specific metadata
checks.repl = process.env.REPL_SLUG;
checks.region = process.env.REPLIT_DEPLOYMENT_REGION;
const statusCode = checks.status === 'ok' ? 200 : 503;
res.status(statusCode).json(checks);
});
export default router;
```
### Step 4: Deploy
```markdown
Via Replit UI:
1. Click "Deploy" button in the top bar
2. Select deployment type:
- Static: for frontend-only apps
- Autoscale: scales to zero when idle
- Reserved VM: always-on, choose machine size
3. Configure machine size (Autoscale/VM):
- 0.25 vCPU / 512 MB — lightweight APIs
- 0.5 vCPU / 1 GB — standard web apps
- 2 vCPU / 4 GB — compute-heavy apps
- 4+ vCPU / 8-16 GB — production workloads
4. Click "Deploy"
5. Monitor build output in the deploy console
```
### Step 5: Custom Domain Setup
```markdown
1. Go to Deployment Settings > Custom Domain
2. Enter your domain: app.example.com
3. Add DNS record at your registrar:
Type: CNAME
Name: app
Value: your-repl-slug.replit.app
4. Wait for SSL auto-provisioning (1-5 minutes)
5. Verify:
```
```bash
# Verify DNS
dig app.example.com CNAME
# Verify SSL
curl -I https://app.example.com
# Verify health
curl -sf https://app.example.com/health | jq .
```
For Replit-purchased domains:
- DNS managed in Replit dashboard
- MX records supported for custom email
- SSL auto-provisioned
### Step 6: Deployment Rollback
Replit supports one-click rollback to any previous successful deployment.
```markdown
1. Go to Deployment Settings > History
2. View list of past deployments with timestamps
3. Click "Rollback" on the desired version
4. Deployment reverts immediately
5. Verify health endpoint after rollback
```
### Step 7: Post-Deploy Verification
```bash
set -euo pipefail
DEPLOY_URL="https://your-app.replit.app"
echo "=== Deployment Verification ==="
# Health check
echo -n "Health: "
curl -sf "$DEPLOY_URL/health" | jq -r '.status'
# Response time
echo -n "Response time: "
curl -s -o /dev/null -w "%{time_total}s\n" "$DEPLOY_URL/"
# SSL certificate
echo -n "SSL: "
curl -sI "$DEPLOY_URL" | grep -i "strict-transport" && echo "OK" || echo "Missing HSTS"
# Autoscale cold start test
echo "Cold start test: wait 10 min, then curl again"
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Deploy fails at build | Dependency error | Test `npm ci && npm run build` locally first |
| 503 after deploy | App crashes on start | Check deployment logs, verify secrets |
| Port mismatch | Not using PORT env | `app.listen(process.env.PORT \|\| 3000)` |
| Cold start slow (>10s) | Heavy imports on startup | Lazy-load non-critical modules |
| Custom domain 404 | DNS not propagated | Wait, or verify CNAME record |
| SSL not provisioning | Wrong DNS record | Must be CNAME to `.replit.app` |
## Resources
- [Autoscale Deployments](https://blog.replit.com/autoscale)
- [Reserved VM Deployments](https://docs.replit.com/cloud-services/deployments/reserved-vm-deployments)
- [Static Deployments](https://docs.replit.com/cloud-services/deployments/static-deployments)
- [Deployment Rollbacks](https://blog.replit.com/introducing-deployment-rollbacks)
- Custom Domains
- [Monitoring Deployments](https://docs.replit.com/cloud-services/deployments/monitoring-a-deployment)
## Next Steps
For multi-environment setup, see `replit-multi-env-setup`.
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.