GitXplorerGitXplorer
o

multi-docker-ci-aws

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
c420f761ebc31329e7025271527f581aa6e77ffd

Changed build to builder in dockerfile

committed 4 years ago
Unverified
0bc8aee04df47898496e177d6a7448b1cacb910d

Changed all hardcorded username to env vars

committed 4 years ago
Unverified
98145c90df2f21700b319134d46d348ac23fc47e

Fixed docker username while pushing

committed 4 years ago
Unverified
e44e656ac71b67613672809ff95e5649e3da7ecf

Added escape character in password

committed 4 years ago
Unverified
82b2ba45a0921ed3eb351452ec7970b81e43b11c

Fixed env variable

committed 4 years ago
Unverified
9d50d5be99b65a1a3119c849b7378664ed1e1fba

Fixed env variable

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