From a103ac4c9ded3d3a943d3ee27c903e26407a9737 Mon Sep 17 00:00:00 2001 From: Teodor Sandu Date: Thu, 19 May 2016 19:01:42 +0300 Subject: [PATCH 1/2] Create Production Environment Configuration.md --- docs/Production Environment Configuration.md | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/Production Environment Configuration.md diff --git a/docs/Production Environment Configuration.md b/docs/Production Environment Configuration.md new file mode 100644 index 0000000..b7d8edb --- /dev/null +++ b/docs/Production Environment Configuration.md @@ -0,0 +1,23 @@ +This document provides the necessary steps taken in order to deploy this app on a server running Windows and IIS. +These steps include the build process which can later be automatized. + +Steps are done on a VM which runs on top of `dnwserver`. Unless specified otherwise, assume each step is done on the VM and not on the server itself. + +#1. Setup Windows VM and IIS site + +- we had the `teamcity` VM running on `dnwserver` and used that. Optionally create a blank VM and install IIS, ASP.NET, etc. +- create site in IIS for the app, on a custom port (> 1024) +- **on `dnwserver`** setup ARR to forward requests to our app on port 80 to the VM on the custom port (Lau did it this time) +- in IIS make sure that the `Application Pool Identity` for the site is set to `Local System` + +#2. Installing technology stack components + +- install node.js [from here](https://nodejs.org/en/download/). At the time of this writing it was [version 4.4.4](https://nodejs.org/dist/v4.4.4/node-v4.4.4-x64.msi) +- for older node versions `node -v` use [NVM](https://github.com/coreybutler/nvm-windows) to update `nvm install latest` then `nvm use ` +- install [iisnode](https://github.com/Azure/iisnode) +- in root add `web.config` adapted [from here](https://tomasz.janczuk.org/2012/05/yaml-configuration-support-in-iisnode.html) +- in root add `iisnode.yml` adapted [from here](https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/iisnode.yml) + +#3. Launch + +Fire up the site and have fun. Add solutions to any issues you encouter to this document. From 5f3d148a9f82750460e36ce24b2e0777815ea5f4 Mon Sep 17 00:00:00 2001 From: Teodor Sandu Date: Fri, 20 May 2016 11:52:49 +0300 Subject: [PATCH 2/2] Update Production Environment Configuration.md Added application port specification --- docs/Production Environment Configuration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Production Environment Configuration.md b/docs/Production Environment Configuration.md index b7d8edb..ea14de2 100644 --- a/docs/Production Environment Configuration.md +++ b/docs/Production Environment Configuration.md @@ -17,6 +17,7 @@ Steps are done on a VM which runs on top of `dnwserver`. Unless specified otherw - install [iisnode](https://github.com/Azure/iisnode) - in root add `web.config` adapted [from here](https://tomasz.janczuk.org/2012/05/yaml-configuration-support-in-iisnode.html) - in root add `iisnode.yml` adapted [from here](https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/iisnode.yml) +- make sure the application does `app.listen(port);` the port is coming from `process.env.PORT` if specified, this is needed for `iisnode` to make use of clustering processes #3. Launch