Tiếng Việt

Continuous Deployment with AWS Elastic Container Registry & AWS Elastic Container Service & CirleCI

Share

service-task-ECS-Diagram.png
  • Create ECR: https://ap-southeast-1.console.aws.amazon.com/ecr/repositories?region=ap-southeast-1 01.png

  • Naming the repo 02.png 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 03.png

  • Fill in Task definition's information 04.png

  • Task definition family name

  • Container's information from ECR

  • Fill In Task definition's environment 05.png

  • Fill in Task definition's CPU, Memory 06.png

  • Once done, Review and Create

  • Create Service 07.png

Leave Environment as default 08.png

Filling deployment configuration Remember to select the previously created task definition 09.png

Add an Elastic Load Balancer Specify the port as 1337 - because the strapi port will run at port 1337 10.png

Networking Select default VPC, select all the subnets and select the security group which allow public inbound traffics 11.png

Once done, click Deploy After few minutes, you will see new service deployed 12.png

Share

Contact Us