Skip to content

Instantly share code, notes, and snippets.

@jamesmishra
Created July 23, 2020 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmishra/3b285d02b2a77b07b5991821a6bc9004 to your computer and use it in GitHub Desktop.
Save jamesmishra/3b285d02b2a77b07b5991821a6bc9004 to your computer and use it in GitHub Desktop.
An example of how to deploy a website to AWS Fargate using Provose.
module "myproject-fargate" {
source = "github.com/provose/provose?ref=v1.1.0"
provose_config = {
authentication = {
aws = {
region = "us-east-1"
}
}
name = "myproject-fargate"
internal_root_domain = "example-internal.com"
internal_subdomain = "myproject-fargate"
}
containers = {
hellofargate = {
image = {
name = "nginxdemos/hello"
tag = "latest"
private_registry = false
}
public = {
https = {
internal_http_port = 80
internal_http_health_check_path = "/"
public_dns_names = ["fargate.example.com"]
}
}
instances = {
# set `instance_type` to be "FARGATE_SPOT" to save money by
# using Spot instances behidn the scenes.
instance_type = "FARGATE"
container_count = 10
cpu = 256
memory = 512
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment