πŸš€ DigitalOcean App Platform Dev Template

Your development container is running! Connect your application to get started.

Repository URL: not set Required
Repository Folder: not set (leave blank for root folder)
Branch: not set (leave blank for main branch)
Dev Start Command: not set Not Set
Workspace Path: /workspaces/app
Sync Interval: 60s
Dev Health Server: true

πŸ“‹ Quick Start Guide

1 Bulk Configuration (Recommended)

The fastest way to configure your app is using the App Platform bulk editor with pre-configured .env.example files from app-examples folder:

How to use:

  1. Open the .env.example file for your framework
  2. Copy all contents
  3. In App Platform UI β†’ Settings β†’ click "Bulk Editor"
  4. Paste the contents and adjust GITHUB_REPO_URL to your repository

Advantage: Copy-paste all settings at once instead of adding them one by one.

Or set variables individually:

GITHUB_REPO_URL = https://github.com/your-username/your-repo.git
GITHUB_REPO_FOLDER = subfolder/path (leave blank for root folder)
GITHUB_BRANCH = main (leave blank for main branch)
2 Configure Your Startup Command

Both are needed: Set DEV_START_COMMAND and create a dev_startup.sh in your repository

DEV_START_COMMAND = bash dev_startup.sh

Why dev_startup.sh is better than a 1-liner DEV_START_COMMAND:

  • You control and version it in your repo (not locked in App Platform settings)
  • Easier to update without redeploying the container
  • Can include complex logic, error handling, and dependency management

Example dev_startup.sh for Next.js:

#!/bin/bash
cd /workspaces/app
npm install
npm run dev -- --hostname 0.0.0.0 --port 8080

See ready-made templates in hot-reload-template/examples, and ask your AI assistant to tailor a dev_startup.sh for your specific codebase.

3 Configure Build Arguments (Build-time)

Go to App Platform UI β†’ Settings β†’ Build Arguments and enable only what you need:

Note: These are BUILD_TIME scope arguments that determine which language runtimes are installed during container build.

INSTALL_NODE = true # For Node.js/Next.js apps
INSTALL_PYTHON = true # For Python/FastAPI apps
INSTALL_GOLANG = true # For Go apps
INSTALL_RUST = false # For Rust apps
4 Redeploy Your App

After setting environment variables, trigger a new deployment to apply changes.

πŸ€– Automate Setup with AI Assistants

Skip manual configuration! AI assistants can automate the entire deployment process:

Supported AI assistants: Claude Code, GitHub Copilot, Cursor, Codex, Antigravity, or any agent that can execute commands

Get started: See the agent.md playbook for detailed automation instructions.

πŸ“š Example dev_startup.sh Scripts

Next.js / React
#!/bin/bash
cd /workspaces/app
npm install
npm run dev -- --hostname 0.0.0.0 --port 8080

Starting point onlyβ€”use your AI assistant to generate a dev_startup.sh tailored to your project, or copy from the examples directory.

Python FastAPI
#!/bin/bash
cd /workspaces/app
uv sync --no-dev
uv run uvicorn main:app --host 0.0.0.0 --port 8080 --reload

Adapt with your AI assistant or reuse the examples/dev_startup.sh.python template.

Go
#!/bin/bash
cd /workspaces/app
go mod tidy
go run main.go

Have your AI assistant extend this for your modules, or copy from examples/dev_startup.sh.golang and adjust.

πŸ”§ Important Notes

⚠️ Your app must listen on port 8080

Make sure your development server binds to 0.0.0.0:8080 (not localhost or 127.0.0.1).

πŸ”„ Hot Reload is Automatic

Your repository syncs every 60 seconds (configurable via GITHUB_SYNC_INTERVAL environment variable, default is 30s). Use a dev server with hot reload (like npm run dev, uvicorn --reload, or air) to see changes without restarting.

πŸ₯ Health Check

The built-in health server runs on port 9090 at /dev_health. Once your app has its own health endpoint, set ENABLE_DEV_HEALTH=false and point health checks to your app.