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/auth_task.yaml

56 lines
1.4 KiB
YAML
Raw Normal View History

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"
2020-05-01 05:47:00 +02:00
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"
2020-05-10 06:06:09 +02:00
RedisHostname:
Description: Redis host to connect to
Type: String
Resources:
LogGroup:
Type: AWS::Logs::LogGroup
Properties:
RetentionInDays: 7
2020-05-10 05:58:10 +02:00
LogGroupName: !Sub "${LogGroupName}-auth/${environment}"
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
2020-05-10 05:58:10 +02:00
- Name: defend-together-authorizer
Essential: 'true'
2020-05-10 05:58:10 +02:00
Image: !Sub "josephbmanley/defend-together-authorizer:${DockerTag}"
2020-05-01 06:06:06 +02:00
MemoryReservation: 250
PortMappings:
2020-05-10 05:58:10 +02:00
- HostPort: 7778
ContainerPort: 7778
Protocol: tcp
2020-05-10 06:06:09 +02:00
Environment:
- Name: REDIS_HOSTNAME
Value: !Ref RedisHostname
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-region:
Ref: AWS::Region
awslogs-group:
Ref: LogGroup
Outputs:
TaskArn:
Description: ARN of the TaskDefinition
Value: !Ref TaskDefinition