Skip to content

A meditation timer deployed as a clustered AWS web application using Terraform and Docker. Written in Go, HTML, JavaScript and CSS.

License

Notifications You must be signed in to change notification settings

smithlabs/gomeditateapp-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gomeditateapp-terraform

Rain

A meditation timer web app written in Golang, JavaScript, CSS, and HTML5.

Deployed as a Dockerized, clustered, Auto Scaling web application to AWS using Terraform.

Links

View the web application deployed to AWS.

View the smithlabs/gomeditateapp-docker GitHub repo contains the source code for the application.

🛰️ Technologies

Amazon AWS Terraform Docker Go JavaScript CSS3 HTML5

This folder contains the full Terraform configuration that deploys the containerized web app across a cluster of web servers (using EC2 and Auto Scaling in an Amazon Web Services (AWS) account.

🔭 Overview

This project will deploy the gomeditateapp-docker project using the smithlabs/gomeditateapp:1.0.2 container image from my DockerHub. The following AWS resources are created.

💡 Below are links to the examples included in this repo.

Note: The main.tf in the project root uses the Dockerhub container for the deploy.

⚙️ Modules

main.tf utilizes my two custom Terraform modules. These modules should be pinned to v1.0.0.

Name Version
smithlabs/terraform-aws-asg-rolling-deploy v1.0.0
smithlabs/terraform-aws-elb v1.0.0

Here is where these modules are used in main.tf.

🐾 Pre-requisites

Please note that this code was written for Terraform 0.13.x.

🔬 Requirements

Name Version
terraform >= 0.13.0
aws >= 2.35

🐇 Quickstart

Please note that this example will deploy real resources into your AWS account. We have made every effort to ensure all the resources qualify for the AWS Free Tier, but we are not responsible for any charges you may incur.

Configure your AWS access keys as environment variables:

export AWS_ACCESS_KEY_ID=(your access key id)
export AWS_SECRET_ACCESS_KEY=(your secret access key)

Deploy the code:

terraform init
terraform apply

When the apply command completes, it will output the DNS name of the load balancer. Visit the ELB url in your browser.

terraform output

Clean up when you're done:

terraform destroy

⬆ back to top

📥Inputs

Name Description Type Default Required
environment The environment name to add to the auto scaling group and ELB resources. string prod no
name The name to prepend to the auto scaling group and ELB resources. string gma-dockerhub no
server_port The port the server will use for HTTP requests. number 8080 no

📤 Outputs

Name Description
elb_dns_name The DNS name for the Elastic Load Balancer

🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests and examples as appropriate.

🏆 Show your support

Please ⭐️ this repository if this project helped you!

Resources

  • EmojiTerra - Copy and paste emojis into your README

📝License

MIT

About

A meditation timer deployed as a clustered AWS web application using Terraform and Docker. Written in Go, HTML, JavaScript and CSS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published