This repository has been archived on 2023-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
defend-together/infrastructure/cloudformation/dt/task.yaml
2020-05-02 03:20:49 -04:00

52 lines
1.3 KiB
YAML

AWSTemplateFormatVersion: '2010-09-09'
Description: Defend Togeher ECS Task
Parameters:
LogGroupName:
Type: String
Description: The AWS CloudWatch log group to output logs to.
Default: "/ecs/dt"
environment:
Type: String
Description: Name of the environment to use in naming.
Default: production
DockerTag:
Description: Tag in DockerHub to deploy
Type: String
Default: "latest"
Resources:
LogGroup:
Type: AWS::Logs::LogGroup
Properties:
RetentionInDays: 7
LogGroupName: !Sub "${LogGroupName}/${environment}"
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
- Name: defend-together
Essential: 'true'
Image: !Sub "josephbmanley/defend-together:${DockerTag}"
MemoryReservation: 250
PortMappings:
- HostPort: 7777
ContainerPort: 7777
Protocol: udp
- HostPort: 80
ContainerPort: 80
Protocol: tcp
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-region:
Ref: AWS::Region
awslogs-group:
Ref: LogGroup
Outputs:
TaskArn:
Description: ARN of the TaskDefinition
Value: !Ref TaskDefinition