Migrate from Heroku
Move a Heroku application to Fransys: the Procfile, config vars, Heroku Postgres, the Scheduler and add-ons.
How things map
Section titled “How things map”| On Heroku | On Fransys |
|---|---|
a web dyno in the Procfile | an Application |
a worker dyno | a copy of the service, with a role read by the entrypoint |
the release phase | Deployment commands › Before an update |
| config vars | Variables, by importing a .env |
| Heroku Postgres | a PostgreSQL database |
| Heroku Redis | a Redis database |
| Heroku Scheduler | a scheduled task |
| a buildpack | a Dockerfile in your repository |
| the domain | Add a domain, then the DNS record |
1. The Dockerfile
Section titled “1. The Dockerfile”Fransys builds a Docker image: add a Dockerfile to your repository. See Deploy Laravel or Node.js and Next.js. Listen on the port of your choice, then set it in Container port (Heroku forces $PORT, Fransys doesn’t).
2. The service and its variables
Section titled “2. The service and its variables”Add the application and connect the CI (From GitHub or GitLab). Get your config vars:
heroku config -s -a my-app > heroku.envthen import the file into Variables (Multiple variables (.env) mode). Remove DATABASE_URL and REDIS_URL: they’ll come from the Fransys databases. Protect the secrets.
3. The data
Section titled “3. The data”Add a PostgreSQL database linked to the application, turn on its remote access, then:
heroku pg:backups:capture -a my-appcurl -o dump.backup "$(heroku pg:backups:url -a my-app)"pg_restore --no-owner --no-acl -h <host> -p <port> -U <user> -d <database> dump.backupwith the Fransys database’s credentials. Turn remote access off once the import is done.
4. Workers and the scheduler
Section titled “4. Workers and the scheduler”- Each
workerdyno: copy the service and give it its role. See Application. - Each Scheduler job: a scheduled task.
5. Switch over
Section titled “5. Switch over”Deploy, check the fransysapp.com address, then add your domain and change the DNS. Keep the Heroku application read-only while the DNS propagates. See Domain and HTTPS.