Configure endpoint for healthcheck Update healthcheck to run HOTFIX: Fix healthcheck protocol HOTFIX: Expose healthcheck port task HOTFIX: Make healthcheck UDP & remove TCP endpoint Reimplement healthcheck without forcing port Reimplement healthcheck without forcing port
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.2 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: 0
 | |
|           ContainerPort: 7777
 | |
|           Protocol: udp
 | |
|         - HostPort: 0
 | |
|           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 |