Scalable AWS ECS Fargate services with SQS
- Terraform v1.7.5
- provider registry.terraform.io/hashicorp/aws v5.41.0
- Nodejs v20
- Specified
DOCKER_HUB_ACCESS_TOKEN
secret in GitHub repository secrets. The token is should be taken from your DockerHub account. - Specified
DOCKER_HUB_USERNAME
variable in GitHub repository variables. The username is should be taken from your DockerHub account. - The
DATABASE_CONNECTION_URI
could be with any default value, the prod value will be generated by terraform on apply stage. - The
REDIS_HOST
could be with any default value, the prod value will be generated by terraform on apply stage.
The build and publish docker image the process is automatically initiated on package version bump triggered by running npm run version:patch
or yarn version:patch
from the repo root folder.
- Created AWS account
- Created user with admin rights and downloaded AWS access key for this user
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- The
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
should be stored in the GitHub secrets
- Create any pull request in GutHub
- Comment in pull request
/plan prod
, where/plan
is the action for terraform andprod
in workspace - Check GitHub actions and in case no issues detected proceed with the next step
- Comment in pull request
/apply prod
, where/apply
is the action for terraform andprod
in workspace - Check GitHub action result for errors