Skip to content

Instantly share code, notes, and snippets.

@Oliver-ke
Last active December 22, 2022 00:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oliver-ke/0c6d7b79bce5e62038349d19824023ba to your computer and use it in GitHub Desktop.
Save Oliver-ke/0c6d7b79bce5e62038349d19824023ba to your computer and use it in GitHub Desktop.
Task definition for ECS
{
"containerDefinitions": [
{
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/api",
"awslogs-create-group": "true",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
},
"portMappings": [
{
"containerPort": 80,
"hostPort": 80,
"protocol": "tcp"
}
],
"name": "api-server",
"essential": true,
"image": "<image>",
"environment": [
{
"name": "PORT",
"value": "80"
},
],
"mountPoints": [
{
"readOnly": null,
"containerPath": "/home/app/files",
"sourceVolume": "cloud9"
}
],
"secrets": []
}
],
"executionRoleArn": "<roleArn>",
"taskRoleArn": "<roleArn>",
"placementConstraints": [],
"cpu": "512",
"memory": "1024",
"family": "api-task-definition",
"requiresCompatibilities": ["FARGATE"],
"networkMode": "awsvpc",
"volumes": [
{
"fsxWindowsFileServerVolumeConfiguration": null,
"efsVolumeConfiguration": {
"transitEncryptionPort": null,
"fileSystemId": "<fs-filesystem-id",
"authorizationConfig": {
"iam": "DISABLED",
"accessPointId": null
},
"transitEncryption": "DISABLED",
"rootDirectory": "/"
},
"name": "cloud9",
"host": null,
"dockerVolumeConfiguration": null
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment