Add RabbitMQ service
This commit is contained in:
@@ -18,6 +18,10 @@ Parameters:
|
|||||||
Type: String
|
Type: String
|
||||||
Default: redis
|
Default: redis
|
||||||
Description: The redis service name
|
Description: The redis service name
|
||||||
|
RabbitMqServiceName:
|
||||||
|
Type: String
|
||||||
|
Default: rabbitmq
|
||||||
|
Description: The rabbitmq service name
|
||||||
ImageUrl:
|
ImageUrl:
|
||||||
Type: String
|
Type: String
|
||||||
Default: nginx
|
Default: nginx
|
||||||
@@ -35,6 +39,10 @@ Parameters:
|
|||||||
Type: Number
|
Type: Number
|
||||||
Default: 6379
|
Default: 6379
|
||||||
Description: What port number the application inside the docker container is binding to
|
Description: What port number the application inside the docker container is binding to
|
||||||
|
RabbitMqContainerPort:
|
||||||
|
Type: Number
|
||||||
|
Default: 5672
|
||||||
|
Description: What port number the application inside the docker container is binding to
|
||||||
ContainerCpu:
|
ContainerCpu:
|
||||||
Type: Number
|
Type: Number
|
||||||
Default: 256
|
Default: 256
|
||||||
@@ -133,6 +141,38 @@ Resources:
|
|||||||
DesiredCount: 1
|
DesiredCount: 1
|
||||||
TaskDefinition: !Ref 'RedisTaskDefinition'
|
TaskDefinition: !Ref 'RedisTaskDefinition'
|
||||||
|
|
||||||
|
# rabbitmq service
|
||||||
|
RabbitMqTaskDefinition:
|
||||||
|
Type: AWS::ECS::TaskDefinition
|
||||||
|
Properties:
|
||||||
|
Family: !Ref 'RabbitMqServiceName'
|
||||||
|
Cpu: !Ref 'ContainerCpu'
|
||||||
|
Memory: !Ref 'ContainerMemory'
|
||||||
|
TaskRoleArn:
|
||||||
|
Fn::If:
|
||||||
|
- 'HasCustomRole'
|
||||||
|
- !Ref 'Role'
|
||||||
|
- !Ref "AWS::NoValue"
|
||||||
|
ContainerDefinitions:
|
||||||
|
- Name: !Ref 'RabbitMqServiceName'
|
||||||
|
Cpu: !Ref 'ContainerCpu'
|
||||||
|
Memory: !Ref 'ContainerMemory'
|
||||||
|
Image: rabbitmq:3.7-management-alpine
|
||||||
|
PortMappings:
|
||||||
|
- ContainerPort: !Ref 'RabbitMqContainerPort'
|
||||||
|
LogConfiguration:
|
||||||
|
LogDriver: json-file
|
||||||
|
RabbitMqService:
|
||||||
|
Type: AWS::ECS::Service
|
||||||
|
DependsOn: LoadBalancerRule
|
||||||
|
Properties:
|
||||||
|
ServiceName: !Ref 'RabbitMqServiceName'
|
||||||
|
Cluster:
|
||||||
|
Fn::ImportValue:
|
||||||
|
!Join [':', [!Ref 'StackName', 'ClusterName']]
|
||||||
|
DesiredCount: 1
|
||||||
|
TaskDefinition: !Ref 'RabbitMqTaskDefinition'
|
||||||
|
|
||||||
WebTaskDefinition:
|
WebTaskDefinition:
|
||||||
Type: AWS::ECS::TaskDefinition
|
Type: AWS::ECS::TaskDefinition
|
||||||
Properties:
|
Properties:
|
||||||
|
Reference in New Issue
Block a user