Migrate from Heroku
Moving from Heroku to Ownkube is mostly mapping your Procfile process types to Ownkube deployments, re-creating your database, and copying your config vars. There’s no rewrite: if it deploys on Heroku, it deploys on Ownkube. This guide walks the cutover, including the database backup and restore.
For a side-by-side of the two platforms, see Ownkube vs Heroku.
What moves
Section titled “What moves”| On Heroku | On Ownkube |
|---|---|
web process in the Procfile | A Web deployment from the same repo |
worker process in the Procfile | A Worker deployment |
| Heroku Scheduler task | A Job deployment with a schedule |
| Heroku Postgres add-on | A managed PostgreSQL database |
| Config vars | Environment variables on the deployment |
| Dyno | A deployment, metered per minute on actual CPU and memory instead of a fixed dyno size |
Migrate your app
Section titled “Migrate your app”-
Connect your repo
Connect your GitHub or GitLab account so Ownkube can build from the same repo. See Registries.
-
Map your Procfile to deployments
Create one Ownkube deployment per process type in your
Procfile. Aweb: ...line becomes a Web deployment with the port your app listens on; aworker: ...line becomes a Worker deployment; anything you run through Heroku Scheduler becomes a Job with a schedule. Ownkube builds from source, or uses yourDockerfileif you have one. -
Copy your config vars
Bring over the values from
heroku config. Add them asKEY=valuepairs and flip Secret on the sensitive ones. See Environment variables.
Migrate your database
Section titled “Migrate your database”-
Create a managed Postgres database
Add a Database (PostgreSQL) in the same environment as your app. Ownkube generates credentials and injects
DATABASE_URLinto your app. See Databases. -
Dump from Heroku
Using your Heroku app’s database URL, dump the data:
Terminal window pg_dump "$(heroku config:get DATABASE_URL -a your-app-name)" --no-owner --no-privileges -Fc -f dump.pgc -
Restore into Ownkube
Turn on public access for the new database (temporarily), then restore into it with TLS verification on:
Terminal window pg_restore --no-owner --no-privileges \-d "postgresql://user:pass@db-yourname.ownkube.app:5432/app?sslmode=verify-full&sslnegotiation=direct" \dump.pgcTurn public access back off when the restore finishes. For production traffic, connect from inside the network.
Cut over
Section titled “Cut over”- Verify on Ownkube. Open the generated hostname, exercise the app, and confirm it reads and writes the migrated database.
- Move your domain. Point your custom domain at the Ownkube deployment. TLS is provisioned and renewed automatically.
- Decommission Heroku once traffic is served from Ownkube and you’ve confirmed a clean window.
Want your own cloud later?
Section titled “Want your own cloud later?”You can start on Ownkube Compute and, if you ever want your own data boundary or your own bill, connect an AWS account and run the same app in your own VPC with no second migration. See Clusters.