Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to deploy applications on AWS ECS using docker-compose

I have a docker-compose file which deploys 3 services:

  • front end angular
  • back end spring boot
  • DB MySQL

locally, works fine. So now I trying to deploy it on a ecs instance and I'm getting a hard time on finding a way to do this.

There is a way to do it? In the future, I want to automate all the process!

like image 270
Leandro Reis Avatar asked Dec 06 '25 08:12

Leandro Reis


1 Answers

Yes since recently (end of 2020) there is way to do it, although i don't have experience with it first hand,

i can comment/reccomend the following:

https://www.docker.com/blog/docker-compose-for-amazon-ecs-now-available/

https://github.com/docker/compose-cli/blob/main/docs/ecs-compose-examples.md

You have to be aware that there are many aws specific resources to be created - by the compose cli, before you get it up and running like on your machine.

What i have experiece with is the Cloudformation way:

https://appfleet.com/blog/automate-docker-container-deployment-to-aws-ecs-using-cloudformation/

Where again, concepts are a bit different than a docker-compose (local) stack.

I suggest hopping on docker's slack and asking there for a hello-world proof-of-concept project; https://www.docker.com/docker-community

EDIT: You can find the 'hello world' at: https://www.docker.com/blog/deploying-wordpress-to-the-cloud/

In respect to automation the key takeaway is that you will build the image with an automated tool (CICD tool) / or manually first and push it to AWS registry. From there a AWS ECS Task will fetch it and deploy it in one of the ECS available nodes.

like image 88
DarthHTTP Avatar answered Dec 08 '25 22:12

DarthHTTP



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!