DigitalOcean App Platform deployment using doctl CLI for containerized applications, web services, static sites, and databases. Includes app spec generation, deployment orchestration, environment management, domain configuration, and health monitoring. Use when deploying to App Platform, managing app specs, configuring databases, or when user mentions App Platform, app spec, managed deployment, or PaaS deployment.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
README.mdscripts/deploy-to-app-platform.shscripts/validate-app.shtemplates/app-spec-docker.yamltemplates/app-spec-nodejs.yamltemplates/app-spec-python.yamltemplates/app-spec-static.yamltemplates/app-spec-with-database.yamlThis skill provides comprehensive deployment lifecycle management for applications deployed to DigitalOcean App Platform using doctl CLI and app specs.
The deployment lifecycle consists of five phases:
Script: scripts/validate-app.sh <app-path>
Purpose: Validates application is ready for App Platform deployment
Checks:
Usage:
# Validate Docker app
./scripts/validate-app.sh /path/to/docker-app
# Validate Node.js app
./scripts/validate-app.sh /path/to/nodejs-app
# Validate static site
STATIC_SITE=true ./scripts/validate-app.sh /path/to/static-site
# Verbose mode
VERBOSE=1 ./scripts/validate-app.sh .
Exit Codes:
0: Validation passed1: Validation failed (must fix before deployment)Script: scripts/generate-app-spec.sh <app-path> <app-name>
Purpose: Generates DigitalOcean app spec from project detection
Actions:
Usage:
# Generate app spec for Docker app
./scripts/generate-app-spec.sh /path/to/app myapp
# Generate with custom port
PORT=3000 ./scripts/generate-app-spec.sh /path/to/app myapp
# Generate with database
DATABASE=postgres ./scripts/generate-app-spec.sh /path/to/app myapp
# Generate for static site
STATIC_SITE=true ./scripts/generate-app-spec.sh /path/to/app myapp
# Generate with custom domain
DOMAIN=myapp.example.com ./scripts/generate-app-spec.sh /path/to/app myapp
Environment Variables:
APP_TYPE: docker, nodejs, python, static (auto-detected if not specified)PORT: Port to run on (default: 8080 for App Platform)DATABASE: Database type (postgres, mysql, redis)STATIC_SITE: Set to true for static site deploymentsDOMAIN: Custom domain to configureREGION: DigitalOcean region (default: nyc)INSTANCE_SIZE: App instance size (default: basic-xxs)INSTANCE_COUNT: Number of instances (default: 1)Exit Codes:
0: App spec generated successfully1: Generation failedScript: scripts/deploy-to-app-platform.sh <app-spec-path> [app-id]
Purpose: Deploys application to DigitalOcean App Platform
Actions:
Usage:
# Create new app
./scripts/deploy-to-app-platform.sh .do/app.yaml
# Update existing app
./scripts/deploy-to-app-platform.sh .do/app.yaml abc123-app-id
# Deploy with monitoring
MONITOR=true ./scripts/deploy-to-app-platform.sh .do/app.yaml
# Deploy and wait for completion
WAIT=true ./scripts/deploy-to-app-platform.sh .do/app.yaml abc123-app-id
Environment Variables:
MONITOR: Set to true to monitor deployment progressWAIT: Set to true to wait for deployment completionTIMEOUT: Deployment timeout in minutes (default: 15)Exit Codes:
0: Deployment successful1: Deployment failedScript: scripts/update-env-vars.sh <app-id>
Purpose: Updates environment variables for deployed app
Actions:
Usage:
# Update env vars interactively
./scripts/update-env-vars.sh abc123-app-id
# Update from .env file
ENV_FILE=.env.production ./scripts/update-env-vars.sh abc123-app-id
# Update specific variables
KEY1=value1 KEY2=value2 ./scripts/update-env-vars.sh abc123-app-id
Exit Codes:
0: Environment variables updated successfully1: Update failedScript: scripts/configure-domain.sh <app-id> <domain>
Purpose: Configures custom domain for App Platform app
Actions:
Usage:
# Add custom domain
./scripts/configure-domain.sh abc123-app-id myapp.example.com
# Add domain with www redirect
WWW_REDIRECT=true ./scripts/configure-domain.sh abc123-app-id myapp.example.com
# Force HTTPS
FORCE_HTTPS=true ./scripts/configure-domain.sh abc123-app-id myapp.example.com
Exit Codes:
0: Domain configured successfully1: Configuration failedScript: scripts/scale-app.sh <app-id> <instance-count> [instance-size]
Purpose: Scales app horizontally or vertically
Actions:
Usage:
# Scale to 3 instances
./scripts/scale-app.sh abc123-app-id 3
# Scale and change instance size
./scripts/scale-app.sh abc123-app-id 2 professional-xs
# Available instance sizes:
# - basic-xxs, basic-xs, basic-s, basic-m
# - professional-xs, professional-s, professional-m, professional-l
Exit Codes:
0: Scaling successful1: Scaling failedScript: scripts/health-check.sh <app-id>
Purpose: Validates App Platform deployment health
Checks:
Usage:
# Check app health
./scripts/health-check.sh abc123-app-id
# Continuous monitoring (runs every 60s)
MONITOR=true ./scripts/health-check.sh abc123-app-id
# Detailed health report
DETAILED=true ./scripts/health-check.sh abc123-app-id
Exit Codes:
0: All health checks passed1: One or more health checks failedScript: scripts/manage-deployment.sh <action> <app-id>
Purpose: Manage App Platform app lifecycle
Actions:
info: Show app information and statuslogs: View app logsrestart: Restart app componentsrollback: Rollback to previous deploymentdestroy: Delete app completelylist: List all apps in accountUsage:
# Show app info
./scripts/manage-deployment.sh info abc123-app-id
# View logs (last 100 lines)
./scripts/manage-deployment.sh logs abc123-app-id
# View logs (follow)
FOLLOW=true ./scripts/manage-deployment.sh logs abc123-app-id
# Restart app
./scripts/manage-deployment.sh restart abc123-app-id
# Rollback to previous version
./scripts/manage-deployment.sh rollback abc123-app-id
# List all apps
./scripts/manage-deployment.sh list
# Destroy app (requires confirmation)
./scripts/manage-deployment.sh destroy abc123-app-id
File: templates/app-spec-docker.yaml
Purpose: App spec for Docker-based applications
Variables:
{{APP_NAME}}: Application name{{GITHUB_REPO}}: GitHub repository (optional){{BRANCH}}: Git branch (default: main){{DOCKERFILE_PATH}}: Path to Dockerfile{{HTTP_PORT}}: HTTP port (default: 8080){{HEALTH_PATH}}: Health check endpoint{{INSTANCE_SIZE}}: Instance size{{INSTANCE_COUNT}}: Number of instances{{ENV_VARS}}: Environment variablesExample:
name: {{APP_NAME}}
region: nyc
services:
- name: web
dockerfile_path: {{DOCKERFILE_PATH}}
github:
repo: {{GITHUB_REPO}}
branch: {{BRANCH}}
deploy_on_push: true
http_port: {{HTTP_PORT}}
health_check:
http_path: {{HEALTH_PATH}}
instance_count: {{INSTANCE_COUNT}}
instance_size_slug: {{INSTANCE_SIZE}}
envs: {{ENV_VARS}}
File: templates/app-spec-nodejs.yaml
Purpose: App spec for Node.js applications
Example:
name: {{APP_NAME}}
region: nyc
services:
- name: web
environment_slug: node-js
github:
repo: {{GITHUB_REPO}}
branch: {{BRANCH}}
deploy_on_push: true
build_command: npm install && npm run build
run_command: npm start
http_port: 8080
health_check:
http_path: /health
instance_count: 1
instance_size_slug: basic-xxs
envs:
- key: NODE_ENV
value: production
File: templates/app-spec-static.yaml
Purpose: App spec for static site deployments
Example:
name: {{APP_NAME}}
region: nyc
static_sites:
- name: frontend
github:
repo: {{GITHUB_REPO}}
branch: {{BRANCH}}
deploy_on_push: true
build_command: npm install && npm run build
output_dir: /dist
routes:
- path: /
File: templates/app-spec-with-database.yaml
Purpose: App spec with managed database
Example:
name: {{APP_NAME}}
region: nyc
services:
- name: api
environment_slug: python
run_command: gunicorn app:app
http_port: 8080
envs:
- key: DATABASE_URL
scope: RUN_AND_BUILD_TIME
type: SECRET
databases:
- name: db
engine: PG
version: "15"
production: true
cluster_name: {{APP_NAME}}-db
File: templates/deployment-config.json
Purpose: Track App Platform deployments
Structure:
{
"version": "1.0.0",
"deployments": [
{
"id": "deployment-uuid-here",
"appId": "abc123-app-id",
"appName": "myapp",
"appType": "docker",
"platform": "digitalocean-app-platform",
"region": "nyc",
"url": "https://myapp-abc123.ondigitalocean.app",
"customDomain": "myapp.example.com",
"status": "active",
"deployedAt": "2025-11-02T19:00:00Z",
"deployedBy": "user@example.com",
"version": "1.0.0",
"metadata": {
"gitCommit": "abc123",
"gitBranch": "main",
"instanceSize": "basic-xxs",
"instanceCount": 1,
"database": {
"engine": "postgres",
"version": "15"
}
},
"components": [
{
"name": "web",
"type": "service",
"port": 8080,
"healthCheck": "/health"
}
],
"environmentVariables": [
{
"name": "DATABASE_URL",
"scope": "RUN_AND_BUILD_TIME",
"type": "secret",
"isSet": true
},
{
"name": "NODE_ENV",
"value": "production",
"scope": "RUN_TIME"
}
],
"health": {
"lastCheck": "2025-11-02T19:05:00Z",
"status": "healthy",
"uptime": "99.9%",
"activeDeployment": true
}
}
],
"metadata": {
"lastUpdated": "2025-11-02T19:05:00Z",
"totalDeployments": 1,
"activeDeployments": 1
}
}
File: templates/deployment-checklist.md
Purpose: Pre-deployment checklist for App Platform
Contents:
File: examples/docker-fastapi-deployment.md
Shows:
File: examples/nodejs-express-deployment.md
Shows:
File: examples/static-site-deployment.md
Shows:
File: examples/background-worker-deployment.md
Shows:
Validate Application:
./scripts/validate-app.sh /path/to/app
Generate App Spec:
./scripts/generate-app-spec.sh /path/to/app myapp
Deploy to App Platform:
./scripts/deploy-to-app-platform.sh .do/app.yaml
Verify Health:
./scripts/health-check.sh <app-id>
Configure Domain (Optional):
./scripts/configure-domain.sh <app-id> myapp.example.com
Update App Spec (if needed):
./scripts/generate-app-spec.sh /path/to/app myapp
Deploy Update:
./scripts/deploy-to-app-platform.sh .do/app.yaml <app-id>
Verify Health:
./scripts/health-check.sh <app-id>
Update Env Vars:
./scripts/update-env-vars.sh <app-id>
Verify Redeployment:
./scripts/manage-deployment.sh info <app-id>
Scale:
./scripts/scale-app.sh <app-id> 3 professional-xs
Verify Health:
./scripts/health-check.sh <app-id>
type: SECRET# View build logs
./scripts/manage-deployment.sh logs <app-id>
# Common issues:
# - Missing build dependencies
# - Incorrect build command
# - Port mismatch (App Platform expects 8080)
# - Missing environment variables at build time
# Check deployment status
./scripts/manage-deployment.sh info <app-id>
# View recent logs
./scripts/manage-deployment.sh logs <app-id>
# Common issues:
# - Health check failing
# - Application not binding to 0.0.0.0:8080
# - Missing runtime environment variables
# - Database connection issues
# Check app status
./scripts/health-check.sh <app-id>
# View logs for errors
./scripts/manage-deployment.sh logs <app-id>
# Common issues:
# - Health check path incorrect
# - App not responding on port 8080
# - Database not accessible
# - Insufficient resources
This skill integrates with:
/deployment:prepare - Pre-deployment validation/deployment:deploy - Execute App Platform deployment/deployment:validate - Post-deployment verification/deployment:rollback - Rollback to previous deployment| Feature | App Platform | Droplet |
|---|---|---|
| Setup Complexity | Low | Medium-High |
| Management | Fully Managed | Self-Managed |
| Scaling | Automatic | Manual |
| Load Balancing | Built-in | Requires Setup |
| SSL/TLS | Automatic | Manual |
| Database | Managed | Self-Hosted |
| Git Integration | Native | Manual |
| Zero Downtime | Yes | Requires Config |
| Cost (Small App) | ~$5-12/mo | ~$4-6/mo |
| Best For | Web apps, APIs, Static sites | Custom configs, Legacy apps |