Procfile
to porter.yaml
porter.yaml
file. While this is an optional step, porter.yaml
allows you to declare your
application in a similar way as you can on Heroku using a Procfile
.
Converting a Procfile
into a porter.yaml
file is straightforward. For example, a Procfile
that looks like this:
porter.yaml
file:
porter.yaml
. For a full guide on how to write a porter.yaml
file, take a look here.
porter.yaml
file is ready and is present in the root folder of your repository, you can simply link up your repository. Porter will detect your porter.yaml
file
and create your application accordingly. Porter supports Heroku’s own buildpacks, so your applications will be built the exact same way as you can on Heroku. If you are capable of it, however,
we recommend that you write a Dockerfile
for your application.
If you are using custom buildpacks, you will have to fork the custom buildpack you are using and make it compatible with Cloud Native Buildpacks.
Doing this is not arbitrary, and in most cases we recommend that you write a Dockerfile
for your application instead. If you are not able to write a Dockerfile
and are using any of the following custom buildpacks, we maintain a fork of these custom buildpacks that you can just plug into Build Settings from the dashboard.
libvips
- Installs the libvips
library (https://github.com/portersupport/cnb-libvips)wkhtmltopdf
- Downloads and extracts the wkhtmltopdf
binaries (https://github.com/portersupport/heroku-buildpack-wkhtmltopdf-1)puppeteer
- Installs dependencies needed in order to run puppeteer (https://github.com/portersupport/cnb-puppeteer)ffmpeg
- Installs ffmpeg
and its dependencies (https://github.com/portersupport/heroku-buildpack-ffmpeg-latest)apt-buildpack
- Installs dependencies declared in the Aptfile
(https://github.com/portersupportapt-buildpack)geo-buildpack
- Installs GEOS libraries (https://github.com/portersupport/cn-buildpack-geo)Dockerfile
instead if possible.
For a step by step guide on how to do this, please follow this guide.
printenv
from your Heroku console or the CLI:
printenv
will contain some variables that you did not add yourself.
You will need to remove some of these environment variables that are specific to Heroku. The important environment variable that’s essential to remove is the PATH
environment variable as this would
cause the build process to fail. With this copied set of environment variables, click on Deploy.
CNAME
record in your DNS provider that points to the Load Balancer’s IP address as specified in the aformentioned docs. This switchover may incur downtime. In most cases, this switchover does not incur more than
5 minutes of downtime. We recommend doing this during your low-traffic hours.