File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 1+ # Stage 1: Build Maven project with JDK 11
2+ FROM maven:3.8.4-openjdk-11 AS build
3+ WORKDIR /app
4+ COPY . .
5+ RUN mvn clean install
6+
7+ # Stage 2: Run the application with JDK 11
18FROM openjdk:11
2- VOLUME /tmp
3- ARG JAR_FILE=target/*.jar
4- COPY ${JAR_FILE} app.jar
5- ENTRYPOINT ["java" ,"-jar" ,"/app.jar" ]
9+ WORKDIR /app
10+ COPY --from=build /app/target/*.jar app.jar
11+ ENTRYPOINT ["java" , "-jar" , "app.jar" ]
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ cloudinary.api-key=******
22cloudinary.api-secret =*****
33cloudinary.cloud-name =******
44spring.datasource.driverClassName =com.mysql.cj.jdbc.Driver
5- spring.datasource.password =1
6- spring.datasource.url =jdbc:mysql://localhost :3306/hobbie_backend_db?allowPublicKeyRetrieval =true&useSSL =false&createDatabaseIfNotExist =true&useUnicode =true&useJDBCCompliantTimezoneShift =true&useLegacyDatetimeCode =false&serverTimezone =Europe/Paris
7- spring.datasource.username =root
5+ spring.datasource.password =gZ3XEYz28B6zBG
6+ spring.datasource.url =jdbc:mysql://ecommerce.czig6eqcivbd.us-east-1.rds.amazonaws.com :3306/hobbie_backend_db?allowPublicKeyRetrieval =true&useSSL =false&createDatabaseIfNotExist =true&useUnicode =true&useJDBCCompliantTimezoneShift =true&useLegacyDatetimeCode =false&serverTimezone =Europe/Paris
7+ spring.datasource.username =admin
88spring.jpa.database-platform =org.hibernate.dialect.MySQL5InnoDBDialect
99spring.jpa.hibernate.ddl-auto =create
1010spring.jpa.hibernate.use-new-id-generator-mappings =false
You can’t perform that action at this time.
0 commit comments