Skip to content

Comments

task-8#1

Merged
inshatan merged 4 commits intomainfrom
task-8
Dec 13, 2020
Merged

task-8#1
inshatan merged 4 commits intomainfrom
task-8

Conversation

@inshatan
Copy link
Owner

@inshatan inshatan commented Dec 6, 2020

Task 8 (Docker. AWS Elastic Beanstalk)

Elastic Beanstalk: http://inshatan-cart-api-dev.eu-west-1.elasticbeanstalk.com/

Frontend application: https://d2v14ttltat414.cloudfront.net

FE Pull Request: inshatan/nodejs-aws-fe#6

BE Pull Request: inshatan/nodejs-aws-be#6

EVALUATION CRITERIA:

  • 1 - Dockerfile is prepared, image is building. Image size is minimised to be less than 500 MB. Image size is equal to 102 MB
  • 2 - Dockerfile is optimized. Files that change more often and commands that depend on them should be included later, files and commands that change less should be at the top.
  • 3 - Folders are added to .dockerignore, with explanations. At least 2 big directories should be excluded from build context. Elastic Beanstalk application is initialized.
  • 4 - Environment is created and the app is deployed to the AWS cloud. You must provide a link to your GitHub repo with Cart API service or PR with created Dockerfile and related configurations.
  • 5 - FE application is updated with Cart API endpoint. You must provide a PR with updates in your FE repository and OPTIONALLY link to deployed front-end app which makes proper API calls to your Cart service.

Tasks

TASK 8.1

  • Add .dockerignore file to minimize build context. Files and folders generated by the application or npm should be excluded. Provide explanations to why the folder was ignored.
  • OPTIONAL: add more folders to .dockerignore with explanations
  • Minimize docker image size by applying techniques found in the lecture to be less than 500 MB.
  • OPTIONAL: Minimize docker image size to about 100 MB.
  • Optimize image build times. Dockerfile commands that run npm install should not depend on typescript files.
  • OPTIONAL: Optimize build times by utilizing multistage builds.
  • OPTIONAL: Lint Dockerfile.

TASK 8.2

Deploy Cart API service with Elastic Beanstalk.

  • Use a Dockerfile from TASK 8.1 to deploy your Cart API using AWS EB CLI.
  • Initiate an Elastic beanstalk application using the eb init command. Application name must follow the following convention {yours_github_account_login}-cart-api.
  • Create a new environment using the eb create command. An environment name must be short but not less then four signs (e.g develop, test, prod, etc). Use the --cname option {yours_github_account_login}-cart-api-{environment_name} so that Elastic Beanstalk will use it to create a proper domain name. Use the --singe option to not use any Load Balancer for this environment.
  • Investigate AWS Elastic Beanstalk service in the AWS Console. Walk through EC2 resources that were created by Elastic Beanstalk
  • Update the app and deploy changes using the eb deploy command.
  • Update FE app: pull the latest version of the app from repo and replace {cart} API placeholder in src/constants/apiPaths.ts using a Cart API url you get after successful deployment. Make sure your app starts to call Cart API when you add or remove items. Now after page refresh cart’s content might remain the same.

@inshatan inshatan changed the title docker task-8 Dec 7, 2020
@inshatan inshatan merged commit d574461 into main Dec 13, 2020
@inshatan inshatan deleted the task-8 branch December 13, 2020 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant