Skip to content

Commit

Permalink
infra: update scaling configuration (#365)
Browse files Browse the repository at this point in the history
* infra: update scaling configuration

* infra: analytics
  • Loading branch information
andreiio authored May 14, 2024
1 parent 1973729 commit e7633ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 9 additions & 5 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module "ecs_app" {

name = local.namespace
cluster_name = module.ecs_cluster.cluster_name
min_capacity = 2
max_capacity = 4
min_capacity = 4
max_capacity = 8

image_repo = local.image_repo
image_tag = local.image_tag
Expand All @@ -22,8 +22,8 @@ module "ecs_app" {
lb_health_check_enabled = true
lb_path = "/"

container_memory_soft_limit = 512
container_memory_hard_limit = 768
container_memory_soft_limit = 768
container_memory_hard_limit = 1024

log_group_name = module.ecs_cluster.log_group_name
service_discovery_namespace_id = module.ecs_cluster.service_discovery_namespace_id
Expand All @@ -37,7 +37,7 @@ module "ecs_app" {
enable_execute_command = var.enable_execute_command

predefined_metric_type = "ECSServiceAverageCPUUtilization"
target_value = 70
target_value = 65

ordered_placement_strategy = [
{
Expand Down Expand Up @@ -111,6 +111,10 @@ module "ecs_app" {
name = "GOOGLE_RECAPTCHA_THRESHOLD"
value = 0.5
},
{
name = "GOOGLE_ANALYTICS_TRACKING_ID"
value = var.google_analytics_tracking_id
},
{
name = "PRELAUNCH_SECRET"
value = var.prelaunch_secret
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,8 @@ variable "prelaunch_secret" {
type = string
default = null
}

variable "google_analytics_tracking_id" {
type = string
default = null
}

0 comments on commit e7633ef

Please sign in to comment.