Skip to content

Commit

Permalink
fix: max 1 replica & ECS task version retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Oct 17, 2023
1 parent 07eacf9 commit 4ccc1af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/event_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ jobs:
if: ${{ needs.paths_filter.outputs.app != 'true' }}
uses: WalletConnect/actions/aws/ecs/get-task-image/@2.1.4
with:
aws-role-arn: ${{ vars.AWS_ROLE_STAGING }}
aws-role-arn: ${{ vars.AWS_ROLE_PROD }}
aws-region: ${{ vars.AWS_REGION }}
task-definition-name: ${{ vars.IMAGE_NAME }}
container-name: ${{ vars.IMAGE_NAME }}
task-definition-name: wc-${{ vars.AWS_REGION }}-prod-${{ vars.IMAGE_NAME }}
container-name: wc-${{ vars.AWS_REGION }}-prod-${{ vars.IMAGE_NAME }}

- name: Get target version
id: get_target_version
Expand Down
1 change: 1 addition & 0 deletions terraform/ecs/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ resource "aws_ecs_service" "app_service" {
task_definition = aws_ecs_task_definition.app_task.arn
launch_type = "FARGATE"
desired_count = var.autoscaling_desired_count
deployment_maximum_percent = 100 # guarantee no more than desired_count tasks are running at a time
propagate_tags = "TASK_DEFINITION"

# Wait for the service deployment to succeed
Expand Down
6 changes: 3 additions & 3 deletions terraform/ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ variable "task_memory" {
variable "autoscaling_desired_count" {
description = "Minimum number of instances in the autoscaling group"
type = number
default = 2
default = 1
}

variable "autoscaling_min_capacity" {
description = "Minimum number of instances in the autoscaling group"
type = number
default = 2
default = 1
}

variable "autoscaling_max_capacity" {
description = "Maximum number of instances in the autoscaling group"
type = number
default = 8
default = 1
}

#-------------------------------------------------------------------------------
Expand Down

0 comments on commit 4ccc1af

Please sign in to comment.