step1: we have fork this reposity from LondheShubham153
Step2: In Jenkins select GitHub project and copy the fork repository URL like this
Then paste it in Jenkins GitHub project section like this
Step 4: In the Source Code Management select Git and copy the repository HTTP URL like this
and paste it in the Source Code Management section and set the Branch Specifier to master like this and you no need add credentials here because it public repository.
step 5: You need to install docker-compose in the server
sudo apt-get install docker-compose
Step 6: Give permission to Jenkins and reboot the server and reboot your Jenkins as well like this
Step 7: In the Build steps run these commands and click save
docker-compose down
docker-compose up -d
Step 8: In instance, security group add 8000 port because we have added port 8000 in docker-compose.ymal file
Step 9: Now click on Build now
you can see its running and click on it
and go to console output you see this
Step 10: Now go to instance IP address
Copy and paste it into google chrome and add ":8000" at the end of the IP address to it like this
Now you see this page and also we have completed our task 02 as well which deploy the node todo app through docker-compose in Jenkins