aws / amazon-ecs-cli

The Amazon ECS CLI enables users to run their applications on ECS/Fargate using the Docker Compose file format, quickly provision resources, push/pull images in ECR, and monitor running applications on ECS/Fargate.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI.html
Other
1.77k stars 302 forks source link

Node Container is not able to communicate with Mongo Container ( Both Specified within the ecs-params.yml file ) #1123

Open AditModi opened 3 years ago

AditModi commented 3 years ago

Node Container is not able to communicate with Mongo Container ( Both Specified within the ecs-params.yml file )

ecs-params.yml file contains task-definitions with two containers node and mongo. docker-compose file also contains node and mongo images.

efekarakus commented 3 years ago

Hi @AditModi ! How are you trying to reach out from the node container to mongodb? Are you leveraging service discovery (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cli-tutorial-servicediscovery.html)

If possible I'd recommend to check out two other alternative tools:

AditModi commented 3 years ago

Hi @efekarakus , I got the node and mongo working using this approach Here basically, creating an ecs cluster, also I am creating a task definition with node and mongo containers, and finally an ecs-service for this task definition.

All of this works manually, What I am looking to achieve: I am looking to write certain commands which would create ecs-cluster , ecs-task definition and ecs-service. I followed this approach My node and mongo containers couldn't connect with each other. using ecs-params.yml file and docker-compose.yml file , I would like that to be achieved.

can it be achieved ? If yes, how can it be done?

(Ps - attaching ecs-params.yml file and docker-compose.yml files I have used )

Archive.zip

atanuGuin commented 3 years ago

HI @AditModi, have you solved this issue? I am a facing similar issue and would like to know about progress on it.