I'm a junior DevOps engineer with some expertise in BackEnd development using Java and Node.js; scripting skills with Python, Bash and JavaScript; besides CI/CD and cloud knowledge of AWS and Azure DevOps tools ...
Deploy a simple GitHub actions CI/CD Workflow into AWS ECR and ECS services. It consists of a Dockerfile to build a Nginx image where an index.html file will be stored in order to display a static web page using ECS as the server by proving a task-definition.json file with all the necessary configurations and ECR as the image registry once the image has been built and pushed.
- Client: ---
- Server: ECR, ECS
- Database: ---
- Cloud provider: AWS
- Tools: GitHub Actions
- Check the repository settings and look for Secrets and Variables option. Set up those variables according to your needs. They have to match with the name of the aws services you create.
- Check the repository settings and look for Environment option. Set up those variables according to your needs. They have to match with the name of the aws services you create.
- Create your own ECR repository Creating an Amazon ECR private repository
- Create your own ECS cluster, task definition file (copy and paste the task-definition.json file stored within this repository inside task definition creation from json in AWS) and ECS service where tasks will be orchestrated
To deploy this project run
- Go to Actions option
- Select Workflow to deploy to Amazon ECS
- Click on Run Workflow and be sure to be in the main branch
- That's it!