diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml index 49ab7ad..d64b94a 100644 --- a/.github/workflows/aws.yml +++ b/.github/workflows/aws.yml @@ -69,13 +69,13 @@ jobs: uses: aws-actions/amazon-ecs-render-task-definition@v1 with: task-definition: task-definition.json - container-name: alpine + container-name: ms-gin-go-container image: ${{ steps.build-image.outputs.image }} - name: Deploy Amazon ECS task definition uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.task-def.outputs.task-definition }} - service: alpine-service - cluster: default + service: ms-gin-go-container-service + cluster: default-dev wait-for-service-stability: true diff --git a/task-definition.json b/task-definition.json index e53acb0..5e4d1c7 100644 --- a/task-definition.json +++ b/task-definition.json @@ -14,7 +14,10 @@ "awslogs-stream-prefix": "ecs" } }, - "entryPoint": [], + "entryPoint": [ + "sh", + "-c" + ], "portMappings": [ { "hostPort": 80, @@ -22,7 +25,9 @@ "containerPort": 80 } ], - "command": [], + "command": [ + "/bin/sh -c \"echo ' Amazon ECS Sample App

Amazon ECS Sample App

Congratulations!

Your application is now running on a container in Amazon ECS.

' > /usr/local/apache2/htdocs/index.html && httpd-foreground\"" + ], "linuxParameters": null, "cpu": 256, "environment": [], @@ -54,7 +59,7 @@ "dockerLabels": null, "systemControls": null, "privileged": null, - "name": "alpine" + "name": "ms-gin-go-container" } ], "placementConstraints": [], @@ -64,7 +69,7 @@ "EC2", "FARGATE" ], - "taskDefinitionArn": "arn:aws:ecs:us-east-2:027479467189:task-definition/ms-gin-go-task-definition:1", + "taskDefinitionArn": "arn:aws:ecs:us-east-2:027479467189:task-definition/ms-gin-go-task-definition:3", "family": "ms-gin-go-task-definition", "requiresAttributes": [ { @@ -110,7 +115,7 @@ ], "networkMode": "awsvpc", "cpu": "256", - "revision": 1, + "revision": 3, "status": "ACTIVE", "inferenceAccelerators": null, "proxyConfiguration": null,