hemax2000 / udagram-aws-deployment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hosting a Full-Stack Application

In this project you will learn how to take a newly developed Full-Stack application built for a retailer and deploy it to a cloud service provider so that it is available to customers. You will use the aws console to start and configure the services the application needs such as a database to store product information and a web server allowing the site to be discovered by potential customers. You will modify your package.json scripts and replace hard coded secrets with environment variables in your code.

After the initial setup, you will learn to interact with the services you started on aws and will deploy manually the application a first time to it. As you get more familiar with the services and interact with them through a CLI, you will gradually understand all the moving parts.

You will then register for a free account on CircleCi and connect your Github account to it. Based on the manual steps used to deploy the app, you will write a config.yml file that will make the process reproducible in CircleCi. You will set up the process to be executed automatically based when code is pushed on the main Github branch.

The project will also include writing documentation and runbooks covering the operations of the deployment process. Those runbooks will serve as a way to communicate with future developers and anybody involved in diagnosing outages of the Full-Stack application.

Udagram

This application is provided to you as an alternative starter project if you do not wish to host your own code done in the previous courses of this nanodegree. The udagram application is a fairly simple application that includes all the major components of a Full-Stack web application.


you can see view the project at: http://udagram-4095-0013-6750.s3-website-us-east-1.amazonaws.com

Dependencies

  • Node v14.15.1 (LTS) or more recent. While older versions can work it is advisable to keep node to latest LTS version

  • npm 6.14.8 (LTS) or more recent, Yarn can work but was not tested for this project

  • AWS CLI v2

  • A RDS database running Postgres.

  • A S3 bucket for Frontend static pages.

  • A EB for hosting Website APIs

Screanshots

S3 Bucket

image

EB

image

RDS

image

CircleCI Pipeline

image

  • build

image

image

  • deploy

image

  • ENV

image


Changes

  • updated the deploy script in the backend json file to allow cricleCi to set env veriables in EB:

    "deploy": "npm run build && eb list && eb use udagram-api-dev && eb deploy && eb setenv AWS_BUCKET=$AWS_BUCKET AWS_PROFILE=$AWS_PROFILE AWS_REGION=$AWS_REGION JWT_SECRET=$JWT_SECRET POSTGRES_DB=$POSTGRES_DB POSTGRES_HOST=$POSTGRES_HOST POSTGRES_PASSWORD=$POSTGRES_PASSWORD POSTGRES_USERNAME=$POSTGRES_USERNAME URL=$URL"

  • Added 3 files for documentation and updated some of the designs

About

License:Other


Languages

Language:TypeScript 78.3%Language:HTML 9.1%Language:SCSS 6.3%Language:JavaScript 5.2%Language:Shell 1.1%Language:Procfile 0.0%