Group members
How to run the project
Tool stack
CI/CD pipeline
Deployment
Database schema
| Member | Email address |
|---|---|
| Plamen | plamengetsov95@gmail.com |
| Florent | kryptag@gmail.com |
| Edmond | edipetres@gmail.com |
| Emil | emilklausen2@hotmail.com |
| Zygimantas | pr.zygimantas@gmail.com |
npm installnpm startOther Commands
npm run buildnpm run testnpm run lintnpm run test:e2enpm run test:unit| Service | Tool | Comment |
|---|---|---|
| Frontend | Vue.js | |
| Backend | Node.js, Express.js | |
| CI/CD pipeline | CircleCI | https://circleci.com/gh/edipetres/HackerNewsG7 |
| Version Control | Github | https://github.com/edipetres/HackerNewsG7 |
| Deployment | AWS | Using AWS, we have changed our deployment strategy |
| Database | Mongodb | https://mlab.com/ |
| Backend Template Project | express-mongo-example | |
| Keys, env vars, credentials and how-tos | Google docs |
See pipeline in CircleCI here
Find the pipeline configuration file here
- Checkout code from Github
- Run tests
- Build production code
- Deploy frontend to AWS S3
- Deploy backend API to AWS ElasticBeanstalk
- Release version on Github - We have chosen to do manual releases.
Set these environment variables in the CircleCI pipeline settings
| Key | Value |
|---|---|
| AWS_ACCESS_KEY_ID | xxxxAVCQ |
| AWS_SECRET_ACCESS_KEY | xxxxnnLR |
| S3_BUCKET_NAME | xxxxoup7 |
Both our back and frontend code lives in this project, but they are deployed to separate AWS services.
After the CI chain builds the static frontend files it uploads them to an S3 bucket. This bucket is configured for Static Website Hosting. It does that by serving the index.html file at the root of the bucket.
Public endpoint for the frontend: http://hackernews-group7.s3-website.eu-central-1.amazonaws.com/
It is important to add the following Policy to the bucket to allow public access to all files - this way everyone on the internet can access our website. Without this policy you will get a 403 Access Forbidden error when navigating to the URL endpoint.
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::hackernews-group7/*"
}]
}Express.js powers our backend API which is deployed to Elastic Beanstalk.
First we manually created an application on EB and a Node.js environment. Using the aws-cli tool we configured the project locally to deploy to this environment (using eb init) - this configuration can be found here. We commit this configuration file which allows the CI chain to know where to deploy the app when running the eb deploy command.
Public IP for our backend API: http://52.28.201.249:3000/
It is important to allow all inbound traffic to the server, otherwise our request will time out. You can do that manually by navigating to the EC2 instance the ElasticBeanstalk environment created for us and edit the attached Security Group: add a custom TCP rule to inboud traffic on port 3000 (the port your API server is listening on) and allow all traffic (0.0.0.0/0, ::/0). See image below.
Latest sent hannest_ids Error responses Response times
We drafted the following sketch for the database schema for our MongoDB.
To-do:
- Add
titleto Post schema DB object

