Posts

Showing posts with the label aws ecs

Guide to Setting Up CI/CD for NextJS with Jenkins, Gitlab, and AWS ECS

Image
Introduction In the previous article, I provided instructions on setting up CI/CD with Jenkins and Gitlab to deploy a NestJS project to AWS EKS. Now, I will provide similar guidance for deploying a project using the NextJS framework to AWS ECS, triggering an auto build on Jenkins when pushing code to Gitlab, and running tests for the project before deployment. A summary of the steps involved will be as follows: Build the Docker image for the NextJS project and push it to AWS ECR. Deploy that Docker image to AWS ECS. Set up Jenkins to connect with Gitlab. When code is pushed to Gitlab, Jenkins will trigger an auto build of the steps defined in the Jenkinsfile, including: Pulling the new code from Gitlab. Running tests for the project. If the test fails, stop the deployment process. If the test passes, proceed to the next step. Building the Docker image with the new code and pushing it to AWS ECR. Deploying to AWS ECS by restarting the service, which will use the latest Docker image to d...

Guide to deploying NextJS on AWS ECS

Image
Introduction I already have an article guiding the deployment of a project using the NestJS framework on AWS ECS, while in this article we will go through how to deploy a frontend project using the NextJS framework also deploying on AWS ECS, the difference is mostly concentrated in building the docker image, as long as you can build the docker image and push successfully to AWS ECR, the next steps are almost identical Prerequisites Because there was a previous article providing quite comprehensive guidance on AWS ECS, in this article I might not instruct in detail about it much more, if there is any information that is not clear you can review previous articles to understand better The goal of the article is to concentrate on the deployment so I will not dive deep into coding NextJS but will reuse from previous articles, you can also use a similar project according to your own needs Detail First of all, let's update the next.config.ts file to support standalone mode import type {...