How to migrate from Heroku to Patr
This guide will walk you through the process of migrating an app from Heroku to Patr.
In order to migrate from Heroku to Patr, the following tools are required:
- Patr CLI
- Heroku CLI: Install instructions can be found here.
- Procfile: Procfile in the root directory of your Heroku app
- Docker: Instructions to install Docker can be found here.
Create an account on Patr.
To migrate your deployments from Heroku to Patr, you need to install the Patr CLI. You can install the CLI by running the following command:
sudo snap install patr --classic --channel=beta
brew install patr-cloud/cli-beta/patr
choco install patr
Binaries for the CLI can be found in our repository
Once the Patr CLI is installed, log in to it with your Patr credentials, using the following command:
This will prompt for your Patr Username and password. Once that's entered, you will be logged in.
Ensure that you have Heroku CLI installed, and logged in. Patr CLI uses the Heroku CLI to detect the details of your Heroku deployment and uses that to migrate. You can find details on installing the Heroku CLI here.
Now that the Heroku CLI is installed, you can start the migration process by running the following command:
patr migrate heroku --app <heroku-app-name>
Once you run this, Patr will dettect your app on Heroku and start the migration process after creating a Dockerfile in your root directory.
After this, a list of your current Docker Respositories on Patr will be displayed. In case you don't have any, you can create one using the CLI.
If you would like to continue with an existing Docker Repository continue by entering 'y'. You'll be prompted to enter the name of the Docker Respository you would like to select.
In case you would like to create a new Docker Repository enter 'n'. You'll be prompted to enter the name of the Docker Respository you would like to create.
After creating/choosing a Docker Respository, enter the name of the repository tag you would like to assign to your Docker image. Click enter if you would like to name it 'latest'.
Following this, Patr will build your Docker image and create a Docker container for deploying your app. Once it's created, confirm by entering 'y' to continue deploying the container. You can enter 'n' in case you would like to terminate the process.
After this, your deployment will get created on Patr and you can access it using the link provided. To make any changes to the deployment head onto the link mentioned or access them at deployments.