5

I have:

  1. A client GitHub repository (html, JS & CSS files) - contains client directory.
  2. BackEnd Github Repository (Node.JS) - contains server directory, package.json, server.js.

Is it possible to setup deployment of those 2 repositories on the same Heroku Domain - So I'll have there the following structure?

  • client
  • server
  • server.js
  • package.json
chenop
  • 4,743
  • 4
  • 41
  • 65
  • What about creating 3rd project and there in package.json as a dependency just add client and server? – Leonid Lazaryev Jun 05 '17 at 18:20
  • What do you mean by saying dependency? – chenop Jun 05 '17 at 18:23
  • Maybe this link offers some insight? It looks like they group the two applications into a single repo and deploy it like that. : https://stackoverflow.com/questions/41461517/deploy-two-separate-heroku-apps-from-same-git-repo – Michael Platt Jun 05 '17 at 18:25
  • Have a look here: https://docs.npmjs.com/files/package.json#git-urls-as-dependencies – Leonid Lazaryev Jun 05 '17 at 18:27
  • @MichaelPlatt Thanks, Its seems it a different case - I'm look for deploying 2 Repositories to the same Heroku app – chenop Jun 05 '17 at 18:27
  • @LeonidLazaryev Thanks, There is no real dependency between those 2 - I just want to be able to deploy each part separately - I know this use case exist but I'm not sure Heroku support that. – chenop Jun 05 '17 at 18:34

1 Answers1

0

The interface of Heroku doesn't allow you to connect more than one GitHub repository explicitly. I think the best possibility is to use Docker images https://www.heroku.com/deploy-with-docker

You can create a separate repository for the image and create webhooks on a push event to your client and server repositories.

Charlie
  • 826
  • 1
  • 11
  • 27