Deploying Containers on AWS
- 26 Jul 2022
- 1 Minute to read
-
Print
-
DarkLight
Deploying Containers on AWS
- Updated on 26 Jul 2022
- 1 Minute to read
-
Print
-
DarkLight
Two or more containers cannot be started at the same time.
For containers running on a new database, start only one first so it may set up the database, After that, start other containers one at a time.
Overview
This article will cover the steps needed to deploy a container onto an AWS(Amazon Web Service) environment. Containers will be created using Amazon ECS.
To deploy in an AWS environment, an AWS account must be created.
Deploying container in AWS
- Login to AWS portal. In the search menu, search for ECS.
- Select Create Cluster.
- Create a cluster with the appropriate template, in this case we will use EC2 Linux + Networking.
- Configure the cluster, for more information on recommended system settings, we can refer to AWS's section in the Installation Guide.
- Once the cluster has been configured, navigate to create task.
- Create a new Task Definition and select the appropriate launch types for the instance.
- Under the volumes header, add a volume for the file storage.
- Under Container definitions, select Add container.
- Specify the container name, and Image. The image can be found on the following Docker repo for Decisions. For the image, it is recommended to use decisionscore/platform:latest to use the latest image for the container.
- Specify a hard limit for the container.
- Under port mapping, map port 80 of the host to port 80 of the container.
- Under the Environment variables section, define both the required and any optional environment variables to configure the container.
- Once the container environment variables have been configured, specify the mount point to be the volume that was created earlier. Map the volume to the \filestorage path of the container.
- Once finished, save and navigate back to the Cluster. Select Run new Task using the created task definition.
Was this article helpful?