Issue
I have a web site assembled (is it the right term?) by Grunt. It has the following structure:
/
src/ (input)
doc/
images/
js/
scss/
Web.config
external/
node_modules/
dist/ (output)
css/
fonts/
images/
js/
gruntfile.js
package.json
To publish it to an Azure Web App using Continuous Deployment and Kudu I added the following files:
.deployment
deploy.cmd
I can upload the web site to /src and deploy it to /dist like this:
Directory of D:\home\site\wwwroot
06/30/2015 01:50 AM <DIR> .
06/30/2015 01:50 AM <DIR> ..
06/30/2015 02:21 AM 30 .deployment
06/30/2015 02:21 AM 3,679 deploy.cmd
06/30/2015 12:44 AM <DIR> dist
06/30/2015 12:40 AM <DIR> external
06/30/2015 02:21 AM 5,697 gruntfile.js
06/30/2015 12:43 AM <DIR> node_modules
06/30/2015 02:21 AM 1,173 package.json
06/30/2015 12:40 AM <DIR> src
But when I specify the root as the destination I'm getting an error:
Source and destination directories cannot be sub-directories of each other
What is the right approach here?
Solution
Edit: Changing answer based on discussion
Try using Virtual Directories: https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/
All sites have site\wwwroot
point to the /
virtual directory by default. If you want \dist
to be your root then change the virtual directory entry to have site\wwwroot\dist
as the physical path and /
as the virtual directory.
You can configure you web.config to specify any script to be your startup script with the following config:
<system.webServer>
<handlers>
<add name="iisnode" path="/src/index.js" verb="*" modules="iisnode" />
</handlers>
</system.webServer>
Answered By - Zain Rizvi Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.