- Ensure you have Node 10.15.3 (on a Mac use Homebrew and
brew install [email protected]
) - Ensure you have NPM 6+ installed.
- Install Docker Engine: https://docs.docker.com/engine/installation/
- Install Angular CLI
npm i -g @angular/cli
- Install Typescript
npm i -g typescript
- Install TSLint
npm i -g tslint
- Install Node packages
npm ci
-
Update the
serverUrl
variable in theproxy.conf.js
andloginUrl
variable in thecypress.env.json
to point to your vantage environment. -
Run local webserver
npm run serve
-
In Chrome go to http://localhost:4200
- Clean up the
deploy
directory.
Mac:
rm -rf ./deploy/
mkdir ./deploy/
Win:
rmdir /S .\deploy\
mkdir .\deploy\
- Build Angular assets
npm run build:prod
- Move assets into
deploy
directory.
Mac:
cp -r ./docker/* ./deploy
cp -r ./dist/* ./deploy
Win:
copy .\docker\* .\deploy
copy .\dist\* .\deploy
- Build docker image with assets
- Replace
WEB_SERVER
withnodejs
ornginx
depending on your need - Replace
IMAGE_NAME
with a name of your choice
- Replace
Mac:
docker build -f deploy/WEB_SERVER/Dockerfile -t IMAGE_NAME ./deploy
Win:
docker build -f deploy\WEB_SERVER\Dockerfile -t IMAGE_NAME .\deploy
-
Run command
docker images
and see it listed -
You can run commands locally now like:
- Replace
YOUR_BASE_URL
with your Vantage Environment Base URL - Replace
IMAGE_NAME
with the image name you used on step 3.
- Replace
docker run -e APPCENTER_BASE_URL=YOUR_BASE_URL -p 49160:8080 -d IMAGE_NAME
docker exec -it CONTAINER_ID /bin/bash
- Tag docker image and push to a repository
- Replace
IMAGE_NAME
with the image name you used when building the image. - Replace
TAG
with a tag for the image. e.g. Version number - Replace
REPOSITORY
with the URL of the repository where you need to push the image.
- Replace
docker tag IMAGE_NAME:latest REPOSITORY/IMAGE_NAME:TAG
docker push REPOSITORY/IMAGE_NAME:TAG