We setup a limited version of the infrastructure needed by HealthLine in AWS using Terraform.
This infrastructure has two environments:
mgmt
: Contains a Bastion Host where you SSH to get access to everything elsestage
: Contains an ECS Cluster running the gruntwork-sample-app
We've given you access to the code in the following repos:
- infrastructure-modules: The Terraform modules that define the entire infrastructure.
- infrastructure-live: The live, deployed infrastructure, using the versioned modules from
infrastructure-modules
. - gruntwork-sample-app: A sample Node.js app that is packaged as a Docker container and shows how to load config files, decrypt secrets in the config files, apply database migrations, and so on.
Check out the temp
branch of the first two repos to see the code that's been deployed.
- Download Docker for Mac or Docker for Windows to your local environment.
git clone https://github.com/healthline/gruntwork-sample-app.git
cd gruntwork-sample-app
docker-compose up
.- Visit http://localhost:3000 with your web browser. Also try:
- http://localhost:3000/greeting to see the dev config in action
- http://localhost:3000/health to see a health check response
- http://localhost:3000/db to see a full database interaction
- Go to http://stage-alb-public-2068811070.us-west-2.elb.amazonaws.com/
- Click around the AWS Console and visit the ECS Console to see the ECS Service deployed.
Note that normally, we would setup a CI system for automatically building Docker images and deploying them, but we haven't done that in this case. Instead, we manually did a docker build
and manually pushed this image to the ECR Repo in AWS.
Please play around with this infrastructure and use it however you want. When we start the official project, we'll destroy everything here and rebuild everything from scratch.