Migrate from DigitalOcean App Platform
Translate .do/app.yaml components, workers, Managed PostgreSQL and Spaces to Gregale.
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 Platform | Gregale |
|---|---|
App / services component | App, 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_path | Your Dockerfile (Container compatibility) |
http_port | PORT set by Gregale; pin a fixed port with hosting.port in gregale.yaml |
health_check.http_path | hosting.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 component | Background worker service in a project: a Compose service without ports: runs continuously |
envs & Encrypted secrets | Secrets (gregale env set) and environment variables |
| Internal service routing | Project services call each other by name: http://api.internal:10081 |
| DigitalOcean Managed PostgreSQL | Managed PostgreSQL, bound as DATABASE_URL |
| DigitalOcean Spaces | Object storage (S3-compatible) or keep Spaces over HTTPS |
| GitHub branch previews | Preview environments per pull request |
| Custom domains | Custom domains |
doctl apps logs | gregale logs my-api (Logs) |
| Rolling deployment | Automatic 1% → 10% → 50% → 100% canary rollouts with auto 5xx rollback + gregale rollback my-api --to v41 --restore-databases |
| Usage notifications | Hard monthly spend caps on every paid plan (Cost controls) |
Translate .do/app.yaml
An App Spec component like this:
# .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:
# 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:
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):
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:
gregale deploy --name my-api --secrets-file do.env
rm do.env
If the deploy fails:
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(not5432). Apps only reach ports80and443by default, so on Pro and Scale open port25060first: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_URLTake a
pg_dumpfrom your DigitalOcean cluster (port25060withsslmode=require) and restore it via Connect from your laptop (needs app tasks on your plan). Point migrations atMIGRATION_DATABASE_URL; your app reads pooledDATABASE_URL(Managed PostgreSQL).
Several services, workers, and Spaces
- Workers and internal APIs. Convert multi-component
servicesandworkerssections from.do/app.yamlinto a Compose file and deploy withgregale deploy(Multi-service apps). Services withoutports: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.
Related articles
DigitalOcean App Platform alternatives in 2026 compares the main platforms people move to from App Platform.
Spotted a problem on this page? Tell us