Is it possible to deploy multiple solutions or one solution with multiple projects to AppHarbor

667 views Asked by At

Okay, this is the situation. I'd like to use AppHarbor to deploy my Single Page Application (SPA) web-application AND my API on. For that we've got the following possible setups.

  1. One solution with two 'startup' projects (.csproj) in it OR
  2. Two solutions each holding resp. Webportal and Api .csproj

We are using Atlassians Bitbucket to get our source from.

Is this possible, either way?

1

There are 1 answers

0
Highmastdon On

This is possible in the way using multiple solution files, step-by-step:

  1. Create your two applications in separate solutions (Project.Web and Project.Api) using Visual Studio (now you have Project.Web.sln and Project.Api.sln)
  2. Create a Git repository and push it to Bitbucket
  3. Create two applications in AppHarbor. Let's name them Project.Web and Project.Api
  4. Copy the build urls from AppHarbor
    Web: https://appharbor.com:443/applications/projectweb/builds?authorization=here is some code
    Api: https://appharbor.com:443/applications/projectapi/builds?authorization=here is some code
  5. Rename your .sln files according to the build urls pattern (taking the part after applicaions/):
    So your Project.Web.sln > becomes > projectweb.sln and the same for the Api.
  6. Now, go to BitBucket > Administration part (wrench top right) > Hooks > Add an AppHarbor hook
  7. Fill in Project the Web-slug namely projectweb
  8. Fill in Token the part of the url after authorization (in this case here is some code)
  9. Do this also for your api project, push to trigger the build and everything should work fine

Good luck!