Skip to content

How to migrate from Heroku to Patr

This guide will walk you through the process of migrating an app from Heroku to Patr.

Prerequisites

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.

Step 1

Create an account on Patr.

Step 2

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:

Ubuntu users:

sudo snap install patr --classic --channel=beta

Mac users:

brew install patr-cloud/cli-beta/patr

Windows users:

choco install patr

Binaries for the CLI can be found in our repository

Step 3

Once the Patr CLI is installed, log in to it with your Patr credentials, using the following command:

patr login

This will prompt for your Patr Username and password. Once that's entered, you will be logged in.

Step 4

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.

Step 5

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.

Step 6

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.

Step 7

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.

Step 8

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'.

Step 9

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.

Step 10

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.