Documentation Frameworks and migration

Migrate from DigitalOcean App Platform

Translate .do/app.yaml components, workers, Managed PostgreSQL and Spaces to Gregale.

~3 min read
On this page

A DigitalOcean App Platform web service or worker usually moves to Gregale without code changes: both deploy from Git repositories or Dockerfiles, bind PORT, and read configuration from environment variables. Gregale does not read .do/app.yaml; this page maps DigitalOcean App Spec fields to gregale.yaml and Compose and walks through a move.

How DigitalOcean App Platform maps to Gregale

DigitalOcean App PlatformGregale
App / services componentApp, deployed with gregale deploy
Container instance (always-on tier)Firecracker microVM per instance. Idle apps pause after ~1s and park at $0 compute (Scale to zero).
Buildpacks (environment_slug)Source builds detect Node, Bun, Python, and Go (Deploy a web framework)
dockerfile_pathYour Dockerfile (Container compatibility)
http_portPORT set by Gregale; pin a fixed port with hosting.port in gregale.yaml
health_check.http_pathhosting.health in gregale.yaml (Deployment overrides)
jobs (KIND: PRE_DEPLOY)Release command: release.command in gregale.yaml (Releases that change the database)
jobs (KIND: POST_DEPLOY / scheduled)Crons or Jobs
workers componentBackground worker service in a project: a Compose service without ports: runs continuously
envs & Encrypted secretsSecrets (gregale env set) and environment variables
Internal service routingProject services call each other by name: http://api.internal:10081
DigitalOcean Managed PostgreSQLManaged PostgreSQL, bound as DATABASE_URL
DigitalOcean SpacesObject storage (S3-compatible) or keep Spaces over HTTPS
GitHub branch previewsPreview environments per pull request
Custom domainsCustom domains
doctl apps logsgregale logs my-api (Logs)
Rolling deploymentAutomatic 1% → 10% → 50% → 100% canary rollouts with auto 5xx rollback + gregale rollback my-api --to v41 --restore-databases
Usage notificationsHard monthly spend caps on every paid plan (Cost controls)

Translate .do/app.yaml

An App Spec component like this:

yaml
# .do/app.yaml
name: my-api
services:
  - name: web
    environment_slug: python
    run_command: gunicorn app:app
    http_port: 8000
    health_check:
      http_path: /healthz
jobs:
  - name: migrate
    kind: PRE_DEPLOY
    run_command: python manage.py migrate

becomes gregale.yaml:

yaml
# gregale.yaml
hosting:
  start: gunicorn app:app --bind 0.0.0.0:$PORT
  health: /healthz
release:
  command: python manage.py migrate

App Platform does not expose PORT in every legacy run command unless configured; make sure your hosting.start binds 0.0.0.0:$PORT (or pin hosting.port: 8000). Check detection locally:

bash
gregale deploy --dry-run

Copy the configuration and deploy

Export your App Spec with doctl and build a single-line KEY=VALUE secrets file from its envs entries (replacing App Platform's ${db.DATABASE_URL} template syntax if switching to Gregale Managed PostgreSQL, and dropping unquoted wrappers):

bash
doctl apps spec get <app-id> -o json | jq -r '.services[].envs[]? | "\(.key)=\(.value // "")"' > do.env

Fill in any encrypted secret values manually (one KEY=VALUE per line, no outer quotes; set multiline values afterward with gregale env set). Then deploy:

bash
gregale deploy --name my-api --secrets-file do.env
rm do.env

If the deploy fails:

bash
gregale app health my-api --errors
gregale logs my-api

The database

  • Keep DigitalOcean Managed PostgreSQL for now. Note that DigitalOcean Managed PostgreSQL commonly listens on port 25060 (not 5432). Apps only reach ports 80 and 443 by default, so on Pro and Scale open port 25060 first: gregale app egress-ports add my-api 25060 (Networking), and add your app's static egress IP (Static egress IP) or trusted source rules in DigitalOcean.

  • Move to managed PostgreSQL. Create a Gregale database (included from Hobby up) and attach a migration role:

    bash
    gregale add postgres --app my-api
    gregale postgres attach my-api-postgres my-api --access migration --env MIGRATION_DATABASE_URL
    

    Take a pg_dump from your DigitalOcean cluster (port 25060 with sslmode=require) and restore it via Connect from your laptop (needs app tasks on your plan). Point migrations at MIGRATION_DATABASE_URL; your app reads pooled DATABASE_URL (Managed PostgreSQL).

Several services, workers, and Spaces

  • Workers and internal APIs. Convert multi-component services and workers sections from .do/app.yaml into a Compose file and deploy with gregale deploy (Multi-service apps). Services without ports: run continuously as workers.
  • Scheduled jobs. Replace scheduled App Platform jobs with HTTP Crons or container Jobs.
  • DigitalOcean Spaces. Either keep using Spaces over HTTPS (443) or create a native S3-compatible bucket on Gregale (Object storage).

Switch traffic

Add and verify your custom domain (Custom domains), switch DNS, and destroy or scale down the App Platform app once traffic is clean.

DigitalOcean App Platform alternatives in 2026 compares the main platforms people move to from App Platform.

Spotted a problem on this page? Tell us