npm package: @renderinc/heroku-import
Description: Heroku CLI plugin to migrate a Heroku app, PostgreSQL DB, and Redis to Render
Author: Render, Inc.
Latest version: 4.0.2

heroku-import
=================

Heroku CLI plugin to migrate a Heroku app, PostgreSQL DB, and Redis to Render

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@renderinc/heroku-import.svg)](https://npmjs.org/package/@renderinc/heroku-import)
[![Downloads/week](https://img.shields.io/npm/dw/@renderinc/heroku-import.svg)](https://npmjs.org/package/@renderinc/heroku-import)
[![License](https://img.shields.io/npm/l/@renderinc/heroku-import.svg)](https://github.com/renderinc/heroku-import/blob/main/package.json)

This plugin helps you migrate your apps and databases from Heroku to Render. It will perform the following steps.

1. Gather information about the specified Heroku app
2. Create a [`render.yaml`](https://render.com/docs/yaml-spec) and `Dockerfile.render` describing your app and database deployment in a format compatible with Render.
3. Give you instructions for how to use the generated `render.yaml` to deploy your service to Render and create PostgreSQL and Redis databases on Render as needed by your app.

Full documentation is available at https://render.com/docs/migrate-from-heroku

***Note:** This plugin will NOT modify your Heroku app in any way.*

# Usage
<!-- usage -->
```sh-session
$ heroku plugins:install @renderinc/heroku-import
$ heroku render:import --app salty-waters-73797

=== Gathering information about Heroku app
Verifying Heroku app exists and CLI is logged in... ✔️
Verifying app is using a single, official Heroku buildpack... ✔️
Getting stack image... heroku-20
Getting and translating plan... Heroku Hobby $7/mo --> Render Starter $7/mo
Getting instance count... 1
Getting custom domains... 1 custom domain(s)
Getting environment variables... 7 environment variable(s)
Getting add-ons... 1 add-on(s)

? Select addons to import. postgresql-polished-30455 using hobby-dev plan

Create render.yaml file and Dockerfile.render? This will overwrite any existing files with the same name. (y/n): y
Generating render.yaml file... done
Generating Dockerfile.render... done

=== Environment variables excluded from render.yaml
The following environment variables were not included in the generated
  render.yaml file because they potentially contain secrets. You may need to
  manually add them to your service in the Render Dashboard.

- DATABASE_URL: postgres://user:password@ec2-12-143-48-54.compute-1.amazonaws.com:5432/dbname
- SECRET_KEY_BASE: s3cr3t

=== Follow these steps to complete import of service(s) and database(s) to Render
1. Add, commit, and push the generated render.yaml and Dockerfile.render to GitHub or GitLab.
2. Go to https://dashboard.render.com/select-repo?type=blueprint
3. Search for and select this repository.
4. Verify the plan showing the resources that Render will create, and
   then click 'Create New Resources'.
5. After the resources are deployed, you may need to manually add
   the above environment variables to your Web Service in the Render Dashboard.
   They were not included in the generated render.yaml because they potentially
   contain secrets.
```

```
$ heroku render:import --help
Create a Dockerfile and render.yaml from an app deployed to Heroku

USAGE
  $ heroku render:import

OPTIONS
  -a, --app=app  (required) name of Heroku app

DESCRIPTION
  This Heroku CLI plugin gathers information about a deployed Heroku app and
  its add-ons and saves that information in a render.yaml file. It then generates
  a Dockerfile which can be used along with the render.yaml file to deploy the
  app and its PostgreSQL databases and/or Redis instances on Render.

EXAMPLE
  $ heroku render:import --app salty-waters-73797
```
<!-- usagestop -->

# Development

The [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli#download-and-install) must already be installed.

1. Clone this repo
2. `cd` into it and run `heroku plugins:link`

Now when you run `heroku render:import`, it will run the code from this directory on your local machine.