Skip to content

deep0304/strapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

107 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECS Deployment Workflow Explanation

This repository contains a GitHub Actions workflow that automates the deployment of a Dockerized application to AWS ECS using Amazon ECR and AWS CodeDeploy.

What We Have Implemented

  1. ECS and CodeDeploy Setup

    • We have created an ECS cluster and service for the application.
    • AWS CodeDeploy has been configured to manage deployments to the ECS service, including support for blue/green deployments.
  2. Deployment Workflow

    • The GitHub Actions workflow handles the entire deployment process automatically whenever changes are pushed to the main branch or triggered manually.
    • Key steps include:
      • Pushing Docker images to Amazon ECR tagged with the GitHub commit SHA.
      • Updating the ECS Task Definition dynamically with the new image tag and environment variables at runtime.
      • Triggering CodeDeploy deployments to roll out the updated ECS service.
      • Optional monitoring of deployment status to ensure successful deployment and support rollback if needed.
  3. Template Files

    • taskdef-template.json and appspec-template.yml are included in the repository.
    • These files contain placeholders for environment variables and other runtime values.
    • During workflow execution, the placeholders are replaced dynamically with actual values such as Docker image tag, environment variables, or resource names.

Workflow Benefits

  • Automated Deployment: No manual intervention is needed to update ECS or trigger CodeDeploy.
  • Dynamic Updates: Task definitions and AppSpec files are updated at runtime to reflect the latest image and environment configuration.
  • Safe Deployment: Using CodeDeploy’s blue/green strategy allows for zero-downtime deployments and easy rollback on failure.
  • Reproducibility: Every commit triggers a consistent deployment pipeline, ensuring the latest code is always live in the ECS service.

This setup ensures a robust, automated, and reliable deployment pipeline for Dockerized applications on AWS ECS.

Screenshots of works

Initial deplooyment using Terraform

image

Deployment using the code-deploy workflow using code deployment

image

Code deploy for the subsequent deployment

image

AWS

image

Aws succeed deployment

image

About

For personal tasks completions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors