GitXplorerGitXplorer
o

multi-docker-ci-aws

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
7f50ed18a0bf6b1078a8dfb40277eb7927b9bd39

Logout from CLI

committed 4 years ago
Unverified
0d007165a3504180dd0894e46b03658978b8d0d1

Added env variables in Travis CI

committed 4 years ago
Unverified
2a2c9a291321583db62ef527b04aebc017d9a13c

Added env variables in Travis CI

committed 4 years ago
Unverified
7ad379c27f10ccd11208f26275717bc203ebf653

Fixed username arg parse

committed 4 years ago
Unverified
26b9b24cd8853aff8833b5b9b33e4f34630760b4

Switched to travis-ci.com

committed 4 years ago
Unverified
0e5ee6c682ca174f9e0186140f636b92eb1158ea

Fixed typos

committed 4 years ago

README

The README file for this repository.

Building Multi-Container Application And Deploying to AWS Elastic Beanstalk Using Travis CI

Containers

  • Nginx
  • Redis (AWS Elasticache)
  • Postgres (AWS RDS)
  • React (client)
  • Express (api server)
  • Worker (calculator)

Docker flow diagram

Descriptions

  • Browser sends the request to Nginx server, which routes the request to respective location
  • Request coming from browser with '/' path requesting (HTML or JS) is directed to react/client server located at port 3000.
  • Request coming from browser with '/api' path (submitting or retrieving values) is directed to express/api server located at port 5000
  • All the submitted values are stored in Postgres database for permanent storage
  • All the submitted and calculated values are stored in Redis database as key-value pairs
  • If the number submitted is previously seen, it will return the calculated value from Redis server, otherwise it is sent to worker container for the calculation
  • Nginx, Express, React and Worker server are hosted on AWS Elastic Beanstalk
  • Redis server is hosted on AWS Elasticache
  • Postgres database server is hosted on AWS RDS
  • Every new version is deployed on AWS EB, as we push our code changes to Github, which is build, tested and deployed using Travis CI

Redis/Postgres is separated from AWS EB because:

  • AWS automatically creates and maintains Redis/Postgres instance for us
  • Super easy to scale
  • Built in logging + maintenance
  • Better security
  • Easy to backups