Skip to content

Commit 5692b46

Browse files
committed
2nd commit
1 parent 1b9f920 commit 5692b46

4 files changed

Lines changed: 42 additions & 3 deletions

File tree

spring-backend/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
FROM openjdk:11-jdk-slim-sid
3+
4+
5+
COPY target/*.jar /opt/
6+
EXPOSE 8080
7+
CMD java -jar /opt/spring-backend-v1.jar

spring-backend/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This guide provides step-by-step instructions for setting up and running a Sprin
66
- Ubuntu operating system
77
- Internet connection
88

9+
10+
911
## Instructions
1012

1113
1. **Update apt package index:**

spring-backend/jenkins.jdp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
pipeline {
2+
3+
4+
agent any
5+
stages{
6+
stage('pull'){
7+
8+
9+
steps{
10+
git branch: 'main', url: 'https://github.com/mayurmwagh/B5-B16-B14-combine-backend.git'
11+
}
12+
}
13+
stage('build'){
14+
steps{
15+
sh 'mvn clean package'
16+
}
17+
}
18+
stage('deploy'){
19+
steps{
20+
sh '''
21+
docker build . -t mayurwagh/combine-backend51416:latest
22+
docker push mayurwagh/combine-backend51416:latest
23+
docker rmi mayurwagh/combine-backend51416:latest
24+
kubectl apply -f ./yaml/
25+
'''
26+
27+
}
28+
}
29+
}
30+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
spring.datasource.url=jdbc:mysql://localhost:3306/springbackend?useSSL=false
2-
spring.datasource.username=springbackend
3-
spring.datasource.password=springbackend
1+
spring.datasource.url=jdbc:mysql://terraform-20250130044334621300000006.c1u46osm6b9i.ap-south-1.rds.amazonaws.com/springbackend?useSSL=false
2+
spring.datasource.username=admin
3+
spring.datasource.password=Redhat123
44

55
spring.jpa.generate-ddl=true

0 commit comments

Comments
 (0)