docker file added

master
parent a23ea6673f
commit e374af0bec

@ -1,15 +1,8 @@
FROM maven:3.6.3-openjdk-17-slim as BUILDER
ARG VERSION=0.0.1-SNAPSHOT
WORKDIR /build/
COPY pom.xml /build/
COPY src /build/src
FROM eclipse-temurin:21-jdk-alpine
RUN mvn clean install
COPY target/mailsender-${VERSION}.jar target/application.jar
FROM java:21.0.2-jre-slim
WORKDIR /app/
COPY --from=BUILDER /build/target/application.jar /app/
CMD java -jar /app/application.jar
WORKDIR /app
VOLUME /tmp
COPY target/mailsender-0.0.1-SNAPSHOT.jar /app/mailsender-0.0.1-SNAPSHOT.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app/mailsender-0.0.1-SNAPSHOT.jar"]

@ -2,9 +2,9 @@ spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=chandrasegar@entgra.io
spring.mail.password=kfgt idre luvt ismk
spring.datasource.url=jdbc:mysql://localhost:3306/email_sending
spring.datasource.username=root
spring.datasource.password=StrongPassword123!
spring.datasource.url=jdbc:mysql://192.168.8.103:3306/email_sending
spring.datasource.username=myuser
spring.datasource.password=ComplexP@ssw0rd
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

Loading…
Cancel
Save