Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a node app to azure if the node app is buried in repo directory

I am trying to deploy a project to azure, via the "remote git repo" method. But in my repo, the actual node application is a few directories in. Thus, Azure does not do anything when the repo is pushed.

Is there some way to configure the azure website to run from a directory buried in the repo?

like image 401
Matt Avatar asked Nov 12 '22 05:11

Matt


1 Answers

There's a super easy way actually. This scenario was anticipated by the Azure team and there's a good way to handle it. It's simple too.

You simply create a text file at the root of your project called .deployment. In the .deployment file you add the following text...

[config]
project = mysubfolder

When you either Git deploy or use CI to deploy from source control, the entire repository is deployed, but the .deployment file tells Kudu (that's the engine that handles your website management) where the actual website (or node project) is.

You can find more info here.

Also, check out this post where I mention an alternative strategy for project repos in case that helps.

like image 144
Jeremy Foster Avatar answered Nov 14 '22 21:11

Jeremy Foster