๐ This repository contains a basic Next.js application that is Dockerized and has a CI/CD pipeline set up using GitHub Actions.
This project demonstrates how to:
- Create a basic Next.js application
- Dockerize the Next.js application for easy deployment
- Set up Continuous Integration and Continuous Deployment (CI/CD) with GitHub Actions
- Next.js: A popular React framework for building server-rendered and statically-generated websites.
- Docker: Containerize the Next.js application to ensure consistency across different environments.
- GitHub Actions: Automate the testing, building, and deployment of the application using CI/CD pipelines.
Make sure you have the following installed:
-
Clone the repository:
git clone https://github.com/your-username/dockerized-cicd.git cd dockerized-cicd -
Install dependencies:
npm install
-
Run the application locally:
npm run dev
-
Build the Docker image:
docker build -t nextjs-app . -
Run the Docker container:
docker run -p 3000:3000 nextjs-app
The application should now be running on http://localhost:3000.
The CI/CD pipeline is configured to:
- Run tests on every push to the
mainbranch. - Build and deploy the Docker container automatically.
To view the workflow file, check out .github/workflows/ci-cd.yml.
Feel free to submit issues or pull requests. Contributions are welcome!
This project is licensed under the MIT License.