Skip to content

Commit

Permalink
Merge pull request #16 from bcgov/chore/capacity-provider-ecs
Browse files Browse the repository at this point in the history
chore: misc
  • Loading branch information
mishraomp authored Dec 16, 2024
2 parents 3c093b7 + 684f0d2 commit be174d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pause-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Pause AWS Resources
shell: bash
run: |
aws application-autoscaling register-scalable-target --service-namespace ecs --resource-id service/ecs-cluster-node-api-dev/node-api-dev-service --scalable-dimension ecs:service:DesiredCount --suspended-state DynamicScalingInSuspended=true,DynamicScalingOutSuspended=true --no-cli-pager --output json
aws application-autoscaling register-scalable-target --service-namespace ecs --resource-id service/ecs-cluster-node-api-dev/node-api-dev-service --scalable-dimension ecs:service:DesiredCount --min-capacity 0 --max-capacity 0 --no-cli-pager --output json
aws ecs update-service --cluster ecs-cluster-node-api-dev --service node-api-dev-service --desired-count 0 --no-cli-pager --output json
DB_CLUSTER_STATUS=$(aws rds describe-db-clusters --db-cluster-identifier qsawsc-aurora-cluster-dev --query 'DBClusters[0].Status' --output text)
if [ "$DB_CLUSTER_STATUS" = "available" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resume-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
echo "DB cluster is not in an stopped state. Current state: $DB_CLUSTER_STATUS"
fi
aws ecs update-service --cluster ecs-cluster-node-api-dev --service node-api-dev-service --desired-count 1 --no-cli-pager --output json
aws application-autoscaling register-scalable-target --service-namespace ecs --resource-id service/ecs-cluster-node-api-dev/node-api-dev-service --scalable-dimension ecs:service:DesiredCount --suspended-state DynamicScalingInSuspended=false,DynamicScalingOutSuspended=false --no-cli-pager --output json
aws application-autoscaling register-scalable-target --service-namespace ecs --resource-id service/ecs-cluster-node-api-dev/node-api-dev-service --scalable-dimension ecs:service:DesiredCount --min-capacity 1 --max-capacity 3 --no-cli-pager --output json
4 changes: 4 additions & 0 deletions infrastructure/api/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ resource "aws_ecs_task_definition" "node_api_task" {
{
name = "FLYWAY_CONNECT_RETRIES"
value = "2"
},
{
name = "FLYWAY_GROUP"
value = "true"
}
]

Expand Down
4 changes: 2 additions & 2 deletions migrations/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM flyway/flyway:10-alpine
FROM flyway/flyway:11-alpine

# Copy migrations
COPY ./sql /flyway/sql
Expand All @@ -9,4 +9,4 @@ USER app

# Health check and startup
HEALTHCHECK CMD info
CMD ["info", "migrate", "info"]
CMD ["info", "migrate", "repair"]

0 comments on commit be174d0

Please sign in to comment.