-
Notifications
You must be signed in to change notification settings - Fork 1
Build Ipe For Dev and Prod
This document will explain how to build and deploy the ipe project to production. The document will also serve as a reference to deploy other independent projects using druid.
Clone github repo
git clone [email protected]:ng-druid/platform.git druid
Install npm dependencies
cd druid
npm install
Build druid core libraries
cd bin
chmod +x build.sh
./build.sh
Build client, server, and lambda application. Replace xxx with cloudfront distribution for client assets.
ng run ipe:build --deployUrl="https://xxx.cloudfront.net/"
ng run ipe:server --deployUrl="https://xxx.cloudfront.net/"
ng run ipe:lambda:dev --deployUrl="https://xxx.cloudfront.net/"
Some background information on how the deployment is structured. The application is broken up into a express application and client side application. The client-side assets including all the JavaScript files will be placed on s3. There is a cloudfront edge distribution that makes those files publicly available. The application can run from the cloudfront distribution domain. However, doing so limits the application to only running in the browser. The second part of the deployment deploys a universal express application as a lambda. This enables the application to served from a lambda using server-side rendering for search optimization and supporting permalinks with preview content since the initial pages content will be physically rendered onto the page as html.