Guide for migrating a NodeJS app from Heroku to Aptible
CMD
declaration (known as an Implicit Service). In short, Aptible requires Dockerfiles while Heroku requires Procfiles.
When switching over from Heroku, you can optionally keep your Procfile. Procfile syntax is standardized and is therefore consistent between Aptible and Heroku. Procfiles can be useful when an application has multiple services. However, you might need to change its location. If you are using the Dockerfile Deploy approach, the Procfile should remain in your root director. However, if you are using Direct Docker Image Deploy, the Procfile should be moved to /.aptible/Procfile
.
Alternatively, for .yaml
fans, you can use Aptible’s optional .aptible.yml
format. Similar to Procfiles, applications using Dockerfile Deploy should store the .aptible.yml
file in the root folder, while apps using Direct Docker Image Deploy should store them at /.aptible/.aptible.yml
.
CMD
utility to accomplish this. CMD
accepts an array of individual words. For instance, for npm start we could do:
.aptible
folder. We can do this by running:
latest.dump
, which needs to be converted into a SQL file to be imported into Postgres. We can do this by using the pg_restore
utility. If you do not have the pg_restore
utility, you can install it on Mac using Homebrew or Postgres.app, and one of the many Postgres clients on Linux.
data.sql
) into the database.
aptible
, postgres
, and the database db
already exists. These are okay. You can learn more about potential errors by reading our database import guide here.
config
utility.
--docker-image
tag on subsequent deploys.