Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
mystist committed Oct 15, 2024
1 parent f3dbe21 commit 88f1532
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
REGISTRY: ghcr.io
CONTAINER_NAME: dapp
APPLICATION_NAME: application
CLUSTER_NAME: dapp-cluster
TASK_DEFINITION: .github/workflows/task-definition.json

jobs:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
sed -i 's|${AWS_REGION}|'"$AWS_REGION"'|g' ${{ env.TASK_DEFINITION }}
sed -i 's|${APP_ENV}|'"$APP_ENV"'|g' ${{ env.TASK_DEFINITION }}
sed -i 's|${CONTAINER_NAME}|'"${{ env.CONTAINER_NAME }}"'|g' ${{ env.TASK_DEFINITION }}
sed -i 's|${APPLICATION_NAME}|'"${{ env.APPLICATION_NAME }}"'|g' ${{ env.TASK_DEFINITION }}
sed -i 's|${CLUSTER_NAME}|'"${{ env.CLUSTER_NAME }}"'|g' ${{ env.TASK_DEFINITION }}
- name: Update image of ECS task definition
id: render-task-def
Expand All @@ -86,5 +86,5 @@ jobs:
with:
task-definition: ${{ env.TASK_DEFINITION }}
service: ${{ env.CONTAINER_NAME }}-ecs-service
cluster: ${{ env.APPLICATION_NAME }}-${{ github.ref_name }}-ecs-cluster
cluster: ${{ env.CLUSTER_NAME }}-${{ github.ref_name }}-ecs-cluster
wait-for-service-stability: true
6 changes: 3 additions & 3 deletions .github/workflows/task-definition.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"family": "${APPLICATION_NAME}-${APP_ENV}-ecs-task",
"family": "${CLUSTER_NAME}-${APP_ENV}-ecs-task",
"networkMode": "awsvpc",
"requiresCompatibilities": ["FARGATE"],
"cpu": "256",
"memory": "512",
"executionRoleArn": "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${APPLICATION_NAME}-${APP_ENV}-ecs-task-execution-role",
"executionRoleArn": "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${CLUSTER_NAME}-${APP_ENV}-ecs-task-execution-role",
"containerDefinitions": [
{
"name": "${CONTAINER_NAME}",
Expand All @@ -29,7 +29,7 @@
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/${APPLICATION_NAME}-${APP_ENV}",
"awslogs-group": "/ecs/${CLUSTER_NAME}-${APP_ENV}",
"awslogs-region": "${AWS_REGION}",
"awslogs-stream-prefix": "${CONTAINER_NAME}"
}
Expand Down

0 comments on commit 88f1532

Please sign in to comment.