This app is built with React and integrates WhatsApp for booking services. This project also includes a CI/CD pipeline setup using Jenkins, Docker, and Kubernetes to ensure continuous delivery and deployment.
├── public
│ ├── index.html
│ └── ...
├── src
│ ├── components
│ ├── index.js
│ ├── App.js
│ └── ...
├── Dockerfile
├── Jenkinsfile
├── kubernetes
│ ├── deployment.yaml
│ └── service.yaml
└── README.md
src/components/
: React components for the website.kubernetes/
: Kubernetes deployment and service configuration files.Dockerfile
: Dockerfile for building the Docker image of the app.Jenkinsfile
: Jenkins pipeline configuration.Make sure you have the following installed on your local machine:
Clone the repository:
git clone https://github.com/mdnumanraza/TANEvents-with-CICD-Jenkins.git
cd TANEvents-with-CICD-Jenkins
Install dependencies:
npm install
Start the app:
npm start
Access the app:
The app will be running at http://localhost:3000
.
This project uses Jenkins for the CI/CD pipeline to automate building and deploying the application to Kubernetes. The Jenkinsfile contains the pipeline configuration which includes:
Clone repository: Jenkins pulls the latest code from GitHub.
Build Docker image:
Docker builds a production image from the Dockerfile
.
Push to Docker Hub: The built Docker image is pushed to Docker Hub for deployment.
Deploy to Kubernetes:
Kubernetes uses the latest Docker image and deploys it using deployment.yaml
and service.yaml
.
The Dockerfile for building the React app:
FROM node:16 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Deploy to Kubernetes: Use the following Kubernetes manifest files to deploy your app:
kubernetes/deployment.yaml
:
apiVersion: apps/v1
kind: Deployment
metadata:
name: tan-events-deployment
spec:
replicas: 2
selector:
matchLabels:
app: tan-events
template:
metadata:
labels:
app: tan-events
spec:
containers:
- name: tan-events
image: your-dockerhub-username/tan-events:latest
ports:
- containerPort: 3000
kubernetes/service.yaml
:
apiVersion: v1
kind: Service
metadata:
name: tan-events-service
spec:
selector:
app: tan-events
ports:
- protocol: TCP
port: 3000
targetPort: 3000
type: LoadBalancer
Access the app:
For any inquiries, please contact:
Mohammed Numan Raza
mohammednuman71417@gmail.com
https://tanevents.com