I have a docker-compose file which deploys 3 services:
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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With