From 32b8147ea17f5cd1b989aa1fa23c9df30ed42777 Mon Sep 17 00:00:00 2001 From: ShafathZ Date: Mon, 13 Apr 2026 01:25:10 -0400 Subject: [PATCH 1/3] Added task definition cloudformation JSON --- aws/anizenith_task_definitions.json | 142 ++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 aws/anizenith_task_definitions.json diff --git a/aws/anizenith_task_definitions.json b/aws/anizenith_task_definitions.json new file mode 100644 index 0000000..5b3d847 --- /dev/null +++ b/aws/anizenith_task_definitions.json @@ -0,0 +1,142 @@ +{ + "family": "AniZenith-MultiContainer-Deployment", + "revision": 1, + "taskRoleArn": "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${TASK_ROLE_NAME}", + "executionRoleArn": "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${EXECUTION_ROLE_NAME}", + "networkMode": "awsvpc", + "requiresCompatibilities": ["FARGATE"], + "cpu": "4096", + "memory": "8192", + "volumes": [ + { + "name": "AniZenithEFSVolume", + "efsVolumeConfiguration": { + "fileSystemId": "${EFS_FILESYSTEM_ID}", + "transitEncryption": "ENABLED", + "authorizationConfig": { + "iam": "ENABLED" + } + } + } + ], + "containerDefinitions": [ + { + "name": "anizenith_frontend", + "image": "surigo/anizenith_frontend:latest", + "cpu": 512, + "memory": 1024, + "memoryReservation": 512, + "portMappings": [ + { + "name": "frontend-http", + "containerPort": 7002, + "hostPort": 7002, + "protocol": "tcp", + "appProtocol": "http" + } + ], + "essential": true, + "environment": [ + { + "name": "BACKEND_HOSTNAME", + "value": "localhost" + }, + { + "name": "BACKEND_PORT", + "value": "9002" + }, + { + "name": "FRONTEND_HOSTNAME", + "value": "0.0.0.0" + }, + { + "name": "FRONTEND_LOGLEVEL", + "value": "info" + }, + { + "name": "FRONTEND_PORT", + "value": "7002" + } + ], + "environmentFiles": [], + "mountPoints": [], + "volumesFrom": [], + "dependsOn": [ + { + "containerName": "anizenith_backend", + "condition": "HEALTHY" + } + ], + "ulimits": [], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs/AniZenith-MultiContainer-Deployment", + "awslogs-create-group": "true", + "awslogs-region": "${AWS_REGION}", + "awslogs-stream-prefix": "ecs" + }, + "secretOptions": [] + }, + "healthCheck": { + "command": [ + "CMD-SHELL", + "curl -f http://localhost:7002/ || exit 1" + ], + "interval": 15, + "timeout": 5, + "retries": 3, + "startPeriod": 30 + }, + "systemControls": [] + }, + { + "name": "backend", + "image": "surigo/anizenith_backend:latest", + "cpu": 2048, + "memory": 8192, + "memoryReservation": 6144, + "essential": true, + "portMappings": [ + { + "name": "backend-http", + "containerPort": 9002, + "hostPort": 9002, + "protocol": "tcp", + "appProtocol": "http" + } + ], + "environment": [ + { + "name": "BACKEND_LOGLEVEL", + "value": "info" + }, + { + "name": "BACKEND_PORT", + "value": "9002" + }, + { + "name": "BACKEND_HOSTNAME", + "value": "0.0.0.0" + } + ], + "secrets": [ + { + "name": "BACKEND_SECRET", + "valueFrom": "arn:aws:secretsmanager:${AWS_REGION}:${AWS_ACCOUNT_ID}:secret:${BACKEND_SECRET_NAME}" + }, + { + "name": "HF_TOKEN", + "valueFrom": "arn:aws:secretsmanager:${AWS_REGION}:${AWS_ACCOUNT_ID}:secret:${HF_TOKEN_SECRET_NAME}" + } + ], + "healthCheck": { + "command": ["CMD-SHELL", "curl -f http://localhost:9002/health || exit 1"], + "interval": 15, + "timeout": 3, + "retries": 3, + "startPeriod": 90 + } + } + ] +} \ No newline at end of file From 250d86a0011bc6fa1d84434f8572e90bee5c8759 Mon Sep 17 00:00:00 2001 From: Suryansh Goyal Date: Tue, 28 Apr 2026 15:43:25 -0400 Subject: [PATCH 2/3] Moving aws stuff under ops dir --- {aws => ops/aws}/anizenith_task_definitions.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {aws => ops/aws}/anizenith_task_definitions.json (100%) diff --git a/aws/anizenith_task_definitions.json b/ops/aws/anizenith_task_definitions.json similarity index 100% rename from aws/anizenith_task_definitions.json rename to ops/aws/anizenith_task_definitions.json From 5ee0f11983e03f70d8d841938f44f28c7089f4e9 Mon Sep 17 00:00:00 2001 From: ShafathZ <53407653+ShafathZ@users.noreply.github.com> Date: Tue, 28 Apr 2026 16:15:16 -0400 Subject: [PATCH 3/3] Apply suggestion from @Copilot Recommended if we are using Cloudformation deployment strategy Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- ops/aws/anizenith_task_definitions.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ops/aws/anizenith_task_definitions.json b/ops/aws/anizenith_task_definitions.json index 5b3d847..926cb8a 100644 --- a/ops/aws/anizenith_task_definitions.json +++ b/ops/aws/anizenith_task_definitions.json @@ -1,6 +1,5 @@ { "family": "AniZenith-MultiContainer-Deployment", - "revision": 1, "taskRoleArn": "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${TASK_ROLE_NAME}", "executionRoleArn": "arn:aws:iam::${AWS_ACCOUNT_ID}:role/${EXECUTION_ROLE_NAME}", "networkMode": "awsvpc",