Deploy two separate heroku apps from same git repo

The solution suggested by rdegges unfortunately does not work anymore. See:

The web process type is special as it’s the only process type that will receive HTTP traffic from Heroku’s routers. Other process types can be named arbitrarily.

from the Heroku documentation. So you won’t be able to have api and web in a Procfile both exposing web apps.

Up-to-date solution

The correct way to tackle this is to use this buildpack provided by the Heroku team: Heroku Multi Procfile buildpack:

Imagine you have a single code base, which has a few different applications within it… or at least the ability to run a few
different applications. Or, maybe you’re Google with your mono repo?

In any case, how do you manage this on Heroku? You don’t. Heroku
applications assume one repo to one application.

Enter the Multi Procfile buildpack, where every app gets a Procfile!

I’ve been using this buildpack for multiple months now on a repository using yarn workspaces (multiple Node and React apps in one repo) and everything works fine.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)