git clone https://github.com/codewithmuh/django-aws-ecs-fargate.git
- Local Setup
- Deploy on AWS ECS Fargate
-
Make sure you Docker desktop or docker daemon is running . you can install docker from office website.
-
Run this command to start project running locally.
docker compose -f "build-process/aws-ecs-fargate/docker-compose-django-backend.yml" up -d --build
Ensure that you have AWS CLI installed. If not, download and install it from the official AWS CLI website.
Run the following command and replace YOUR_AWS_PROFILE_NAME
with your desired AWS CLI profile name:
aws configure --profile YOUR_AWS_PROFILE_NAME
Replace YOUR_AWS_PROFILE_NAME with the desired name for your AWS CLI profile.
Input AWS Access Key ID: Enter your AWS Access Key ID when prompted.
Input AWS Secret Access Key: Enter your AWS Secret Access Key when prompted.
Default Region: Specify the default AWS Region you want to use for this profile.
-
Open deploy-prod.sh file and make chnage, Replace YOUR_AWS_PROFILE_NAME, YOUR_REGION_NAME, YOUR_ACCOUNT_ID, YOUR_ECR_REPO_NAME, YOUR_CLUSTER_NAME, YOUR_SERVICE_NAME
-
Then Run this command, it will build eocker image, and push image to ecr, It will also update ecs service
build-process/aws-ecs-fargate/deploy-prod.sh