Angular / Deploy Application / Staging Area
This documentation describes how to deploy an Angular application to the Angular development environment staging area.
- Introduction
- Staging to Deploy to an AWS S3 Dedicated Bucket
- Staging to Deploy to an AWS S3 Bucket Folder
Introduction
Angular application development occurs in the application code folder using ng serve
or ng serve -o
.
Need to discuss here the general use of ng build
and other options related to building a website in the staging area.
Testing can then occur in the staging area as if deployed.
Staging to Deploy to an AWS S3 Dedicated Bucket
This documentation focuses on staging for deployment to a dedicated AWS S3 bucket. Because the bucket is dedicated to the application, the staging files should exactly match the files uploaded to S3. See also:
Examples follow, which use a dedicated bucket for the Angular application, and therefore no folder in the deployed application URL:
- http://co-agurban.openwaterfoundation.org - latest production release
- http://co-agurban-dev.openwaterfoundation.org - development release
Questions to be answered for this and the following section,
and also update the aws.md
file with general guidelines:
- How to use the staging area to mimic the AWS S3 deployed application.
- Are any changes in Angular application configuration needed between development environment and staging area?
- What commands or scripts are run to perform tasks in the staging area and deploy the application?
- Are standard Angular scripts/packages available to deploy to S3 or is a custom script needed? Note that OWF often uses custom scripts to copy files to S3.
- How is the URL path handled (in particlar for folder used in next section)?
- For the script that uploads to S3, are "heavy" assets like spatial data files also included or does extra data need to be uploaded?
Staging to Deploy to an AWS S3 Bucket Folder
This documentation focuses on staging for deployment to a an AWS S3 bucket folder. Because a bucket folder is used, the URL for the deployed application will have the folder. See also:
Examples follow, which use a folder in the S3 bucket, and therefore a folder in the deployed application URL:
- http://poudre.openwaterfoundation.org/latest/ - latest production release
- http://poudre.openwaterfoundation.org/dev/ - development version