Create ECR: https://ap-southeast-1.console.aws.amazon.com/ecr/repositories?region=ap-southeast-1
Naming the repo Once done, click
Create repository
Inside the circleci.yml file, we update the repo-name
jobs:
build-and-deploy-stage:
executor: ubuntu
steps:
- aws-ecr/build-and-push-image:
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
create-repo: true
platform: linux/amd64
push-image: true
tag: latest
repo: strapi-template
ECS
Create Task definition
Fill in Task definition's information
Task definition family name
Container's information from ECR
Fill In Task definition's environment
Fill in Task definition's CPU, Memory
Once done, Review and Create
Create Service
Leave Environment as default
Filling deployment configuration Remember to select the previously created task definition
Add an Elastic Load Balancer Specify the port as 1337 - because the strapi port will run at port 1337
Networking Select default VPC, select all the subnets and select the security group which allow public inbound traffics
Once done, click Deploy
After few minutes, you will see new service deployed