digitalocean-app-deployment
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.
What this skill does
# DigitalOcean App Platform Deployment Skill This skill provides comprehensive deployment lifecycle management for applications deployed to DigitalOcean App Platform using doctl CLI and app specs. ## Overview The deployment lifecycle consists of five phases: 1. **Pre-Deployment Validation** - Application readiness, app spec validation, configuration 2. **App Spec Generation** - Create/update app spec based on project detection 3. **Deployment** - Create or update app, configure services and databases 4. **Domain & Environment Management** - Custom domains, environment variables, scaling 5. **Post-Deployment Verification** - Health checks, deployment status validation ## Supported Application Types - **Web Services**: Node.js, Python, Go, Ruby, PHP applications - **Static Sites**: React, Vue, Next.js static exports, Hugo, Jekyll - **Workers**: Background jobs, queue processors, scheduled tasks - **Databases**: PostgreSQL, MySQL, Redis (managed databases) - **Docker**: Custom Docker containers ## Available Scripts ### 1. Application Validation **Script**: `scripts/validate-app.sh <app-path>` **Purpose**: Validates application is ready for App Platform deployment **Checks**: - Dockerfile present (for Docker apps) OR supported runtime detected - Environment configuration (.env.example present) - No hardcoded secrets in code or Dockerfile - Port configuration matches App Platform requirements (8080 default) - Build command specified or detectable - Resource requirements reasonable **Usage**: ```bash # 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 passed - `1`: Validation failed (must fix before deployment) ### 2. Generate App Spec **Script**: `scripts/generate-app-spec.sh <app-path> <app-name>` **Purpose**: Generates DigitalOcean app spec from project detection **Actions**: - Detects application type (Docker, Node.js, Python, static) - Generates appropriate app spec configuration - Configures build and run commands - Sets up environment variables - Defines health checks - Configures resource limits - Outputs app spec to .do/app.yaml **Usage**: ```bash # 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 deployments - `DOMAIN`: Custom domain to configure - `REGION`: 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 successfully - `1`: Generation failed ### 3. Deploy to App Platform **Script**: `scripts/deploy-to-app-platform.sh <app-spec-path> [app-id]` **Purpose**: Deploys application to DigitalOcean App Platform **Actions**: - Validates doctl authentication - Creates new app OR updates existing app - Uploads app spec - Triggers deployment - Monitors deployment progress - Captures deployment URL - Verifies deployment completed **Usage**: ```bash # 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 progress - `WAIT`: Set to `true` to wait for deployment completion - `TIMEOUT`: Deployment timeout in minutes (default: 15) **Exit Codes**: - `0`: Deployment successful - `1`: Deployment failed ### 4. Update Environment Variables **Script**: `scripts/update-env-vars.sh <app-id>` **Purpose**: Updates environment variables for deployed app **Actions**: - Retrieves current app spec - Prompts for updated environment variables - Updates app spec with new variables - Triggers redeployment to apply changes - Verifies redeployment successful **Usage**: ```bash # 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 successfully - `1`: Update failed ### 5. Configure Domain **Script**: `scripts/configure-domain.sh <app-id> <domain>` **Purpose**: Configures custom domain for App Platform app **Actions**: - Validates domain ownership - Adds domain to app configuration - Configures SSL/TLS certificate - Updates DNS configuration - Verifies domain is accessible **Usage**: ```bash # 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 successfully - `1`: Configuration failed ### 6. Scale Application **Script**: `scripts/scale-app.sh <app-id> <instance-count> [instance-size]` **Purpose**: Scales app horizontally or vertically **Actions**: - Updates app spec with new instance configuration - Triggers redeployment with new scale - Monitors scaling progress - Verifies all instances healthy **Usage**: ```bash # 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 successful - `1`: Scaling failed ### 7. Health Check **Script**: `scripts/health-check.sh <app-id>` **Purpose**: Validates App Platform deployment health **Checks**: - App deployment status (active/deploying/failed) - All components healthy - HTTP endpoint responding - Database connectivity (if configured) - SSL certificate valid - Resource usage within limits - Recent deployment logs **Usage**: ```bash # 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 passed - `1`: One or more health checks failed ### 8. Manage Deployment **Script**: `scripts/manage-deployment.sh <action> <app-id>` **Purpose**: Manage App Platform app lifecycle **Actions**: - `info`: Show app information and status - `logs`: View app logs - `restart`: Restart app components - `rollback`: Rollback to previous deployment - `destroy`: Delete app completely - `list`: List all apps in account **Usage**: ```bash # 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 vers
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.