Skip to content

briancaffey/flask-redis-ecs-terraform

Repository files navigation

flask, redis ecs, terraform

Overview

This repo is for testing ECS networking configurations using:

  • a simple flask app
  • ECS cluster (EC2 or Fargate?)
  • awsvpc networking mode
  • CloudMap for service discovery
  • redis server running as a service in our ECS cluster

Setup

  • add a simple flask app
  • add a simple dockerfile
  • add a simple docker-compose file with flask app and redis (dev mode)
  • add a simple docker-compose file with flask app and redis (prod mode with gunicorn)
  • add a redis connection to flask app
  • add basic view to test redis connection
  • add a terraform config that can be used locally

AWS Setup

  • Setup ECR repository for flask backend
  • Build and push flask backend to ECR
  • ACM certificate ARN stored in terraform.tfvars file locally
  • Hosted Zone and Domain name purchased through AWS Route 53

Terraform Configuration Details

  • VPC with only public subnets and no NAT gateway
  • Launch Configuration with 1 EC2 instance
  • ASG for ECS
  • Service Discovery Resources

About

Example project using flask, redis, AWS ECS and terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published