Firstly you need :
- JRE 17 or 21
- Docker and Docker Compose Plugin
- Jenkins (LTS or Weekly)
- BunJS
Make sure you add Jenkins
to Docker
Group, and restart jenkins.service
.
Install script for above tools ( only for debian based distributions can be found inside Jenkins folder)
curl -sSL https://raw.githubusercontent.com/AdityaAparadh/CICD/master/Jenkins/install.sh | sudo bash
- Visit
http://localhost:8080
The initial password can be found by:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
-
Then select Install Recommended Plugins. Wait for installation.
-
After that, ignore user setup for now
-
On Jenkins Dashboard, click on
New Item
-
Name the Item, and select type as Pipeline
-
Set respective fields, and for groovy script, copy from this repo. Also set Git SCM polling to "* * * * *", which will poll every minute.
-
Save pipeline.
-
Build Manually.
-
Visiting
http://localhost:5173
should now open the application. -
docker ps
should show three running containers, for Frontend, Backend and Database (MongoDB).