This project was bootstrapped with Create React App.
In the project directory, you can run:
Install all the dependencies
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
The app is deployed to aws ec2 instance via elastic beanstalk and we are using nginx as our server
- Uses buildspec.yml
- login to aws using cli tool for ECR
- we use first 7 characters of commit hash as our tag
- Docker build image
- Tag the image we just built with "latest" too for Dockerrun.aws.json
- Push the image to ECR for beanstalk
- Set artifact as Dockerrun.aws.json
- Retrieve the artifacts: Dockerrun.aws.json
- Runs Dockerrun.aws.json file to tell EBS which ECR to pull image from (security is done via IAM)
- Run docker container
- Need to give EB role to access ECR
- Potentially: log file to S3 bucket as well (future)
- In CodeBuild, double check where the artifact are sending to (should be in the bucket codepipeline created)
- Maybe s3 bucket as well (for storing artifacts?)
- Remember to add SLL certificate (can be obtained from certificate manager) and add listener (port 443) in EBS config
- Remember to use Route53 to route HTTP(S) to correct server
- EC2 Security Group: Inbound traffic: 22 (SSH), 80 (TCP) and 3000 (don't think is necessary?)