'Is every docker image need to have their own cluster, task definition, target group and path from application internet facing load balancer?
I have the following project structure :
Service Group A :
- ReactJs / Webpack A
- Express App A1
- Express App A2
- Express App A3
Service group B :
- ReactJs/ Webpack B
- Express App B1
- Express App B2
Service group C :
- React Js/Webpack C
- Express App C1
- Express App C2
Main Service :
- React Js/ Webpack Main
Each project has their own docker image.
How do I make group of docker image in AWS ECR Does each service needs to have their own cluster,task definition, target group, forwarded from 1 internet-facing load balancer ?
Solution 1:[1]
If you use ECS you can define multiple containers in the same task definition and they will be launched together as tasks. Then you scale them with an ECS service if needed.
Check this gist for example : https://gist.github.com/anosulchik/29312f8b30fa6f88b9c997281d32d822 The JSON containerDefinitions key defines multiple container.
- One cluster can launch multiple tasks
- One task definition can launch multiple containers
- One load balancer can serve traffic to multiple ECS service (1 service = 1 target group).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | nassou |