Deploying to AWS Fargate
AWS Fargate is a service from AWS that allows users to run containers on the AWS platform without the need to manage the underlying infrastructure. We will learn how to deploy our Strapi API as a Docker container to AWS Fargate. The requirements are as follows:
- Have an AWS account and set up the AWS CLI
- Have the Docker CLI installed locally
There are a few steps involved in deploying our API to AWS Fargate. Here is an overview of all the steps. First, we will create a containerized version of our API using Docker. Next, we will use Amazon Elastic Container Registry (Amazon ECR) to create a Docker repository. We will then push our Strapi API Docker image to this repository. Finally, we will create a Fargate cluster that will use the Docker repository to run our API.
Step 1 – Creating a Docker image for our API
The first step is to create a Docker image for our API, so let's get started:
- Create a new file called...