diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..157cda1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM tomcat:9.0 +COPY target/*.war /usr/local/tomcat/webapps/app.war +EXPOSE 8080 diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..7847706 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + agent any + stages { + stage("Build & Package") { + steps { + sh "mvn clean package" + } + } + stage("Build Docker Image") { + steps { + sh "docker build -t trainbook-app ." + } + } + stage("Deploy") { + steps { + sh "docker rm -f trainbook-container || true" + sh "docker run -d --name trainbook-container -p 8082:8080 trainbook-app" + } + } + } +} diff --git a/README.md b/README.md index 4f8929d..ec5a3ea 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - Youtube video for Step by Step Guide on Local Setup: https://www.youtube.com/watch?v=Wd2GlEJJJlw - +###project_details: ### About: This project is about the Train-Ticket-Reservation-System which is used to view Train Schedule, search trains, Seat availability, Train timings. We can also enquire about fare of different trains. We can get information about train between two stations. We can book seats online. This provides a safe and secure seat reservation system. ### Online Train Information and Reservation