Development (local), staging (cloud), and production (cloud) using GitHub Actions
environment
variable in the jobs section of the GitHub Actions below
based on the name of your GitHub environments.AWS_ACCESS_KEY_ID
.AWS_SECRET_ACCESS_KEY
.set up a workflow yourself
and click it.env
:Key | Description | Sample value |
---|---|---|
AWS_REGION | Region of your AWS ECS cluster. | us-west-2 |
CONTAINER_NAME | Set this to the name of the container in the containerDefinitions section of your task definition. | mage-data-production-container |
ECR_REPOSITORY | The name of the AWS ECR repository you created to store your Docker images. | mage-data |
ECS_CLUSTER | The name of your AWS ECS cluster. | mage-production-cluster |
ECS_STAGING_SERVICE | The name of your AWS ECS staging service. | mage-production-cluster |
ECS_PRODUCTION_SERVICE | The name of your AWS ECS production service. | mage-production-ecs-service |
ECS_STAGING_TASK_DEFINITION | Go to your AWS ECS task definition for the staging service. Click on the JSON tab on the task definition detail page. Copy the JSON string content and save it to a file in your root folder containing your Mage project. Use the path to that file as the value in this field. | some_path/ecs-task-definition.json |
ECS_PRODUCTION_TASK_DEFINITION | Go to your AWS ECS task definition for the production service. Click on the JSON tab on the task definition detail page. Copy the JSON string content and save it to a file in your root folder containing your Mage project. Use the path to that file as the value in this field. | some_path/ecs-task-definition.json |