Category: Database, Docker, nginx, logging, yaml

Nowadays, using Docker as an infrastructure container for local testing purposes is becoming more and more common. Many times developers exploit docker-compose functionality to create an infrastructure stack that contains their application, web server, and databases in different docker containers.

For AWS Fargate we have already discussed all steps needed to create a cluster and services in this article.

In case your account contains a VPC that you want to use, you’ll need to specify it in the deploy command: Keep in mind that if you specify a custom VPC ID you have to specify also the subnets ids where you want to deploy your service; to let ECS CLI create and configure the VPC for you, simply run: This command will create an empty ECS Cluster, and if you have not specified the VPC before, a CloudFormation stack with the VPC resources.

Now that you have modified the docker-compose file, you have to create a new file called “ecs-params.yml” that contains the configurations of your ECS Cluster and ECS Service.

Related Articles