Add catalogue service
This commit is contained in:
@@ -22,6 +22,10 @@ Parameters:
|
|||||||
Type: String
|
Type: String
|
||||||
Default: rabbitmq
|
Default: rabbitmq
|
||||||
Description: The rabbitmq service name
|
Description: The rabbitmq service name
|
||||||
|
CatalogueServiceName:
|
||||||
|
Type: String
|
||||||
|
Default: catalogue
|
||||||
|
Description: The catalogue service name
|
||||||
ImageUrl:
|
ImageUrl:
|
||||||
Type: String
|
Type: String
|
||||||
Default: nginx
|
Default: nginx
|
||||||
@@ -43,6 +47,10 @@ Parameters:
|
|||||||
Type: Number
|
Type: Number
|
||||||
Default: 5672
|
Default: 5672
|
||||||
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
|
||||||
|
CatalogueContainerPort:
|
||||||
|
Type: Number
|
||||||
|
Default: 8080
|
||||||
|
Description: What port number the application inside the docker container is binding to
|
||||||
ContainerCpu:
|
ContainerCpu:
|
||||||
Type: Number
|
Type: Number
|
||||||
Default: 256
|
Default: 256
|
||||||
@@ -173,6 +181,39 @@ Resources:
|
|||||||
DesiredCount: 1
|
DesiredCount: 1
|
||||||
TaskDefinition: !Ref 'RabbitMqTaskDefinition'
|
TaskDefinition: !Ref 'RabbitMqTaskDefinition'
|
||||||
|
|
||||||
|
# catalogue service
|
||||||
|
CatalogueTaskDefinition:
|
||||||
|
Type: AWS::ECS::TaskDefinition
|
||||||
|
DependsOn: ['MongoDbService']
|
||||||
|
Properties:
|
||||||
|
Family: !Ref 'CatalogueServiceName'
|
||||||
|
Cpu: !Ref 'ContainerCpu'
|
||||||
|
Memory: !Ref 'ContainerMemory'
|
||||||
|
TaskRoleArn:
|
||||||
|
Fn::If:
|
||||||
|
- 'HasCustomRole'
|
||||||
|
- !Ref 'Role'
|
||||||
|
- !Ref "AWS::NoValue"
|
||||||
|
ContainerDefinitions:
|
||||||
|
- Name: !Ref 'CatalogueServiceName'
|
||||||
|
Cpu: !Ref 'ContainerCpu'
|
||||||
|
Memory: !Ref 'ContainerMemory'
|
||||||
|
Image: robotshop/rs-catalogue
|
||||||
|
PortMappings:
|
||||||
|
- ContainerPort: !Ref 'CatalogueContainerPort'
|
||||||
|
LogConfiguration:
|
||||||
|
LogDriver: json-file
|
||||||
|
CatalogueService:
|
||||||
|
Type: AWS::ECS::Service
|
||||||
|
DependsOn: LoadBalancerRule
|
||||||
|
Properties:
|
||||||
|
ServiceName: !Ref 'CatalogueServiceName'
|
||||||
|
Cluster:
|
||||||
|
Fn::ImportValue:
|
||||||
|
!Join [':', [!Ref 'StackName', 'ClusterName']]
|
||||||
|
DesiredCount: 1
|
||||||
|
TaskDefinition: !Ref 'CatalogueTaskDefinition'
|
||||||
|
|
||||||
WebTaskDefinition:
|
WebTaskDefinition:
|
||||||
Type: AWS::ECS::TaskDefinition
|
Type: AWS::ECS::TaskDefinition
|
||||||
Properties:
|
Properties:
|
||||||
|
Reference in New Issue
Block a user