Skip to content

Commit

Permalink
Deleted target folder and fixed dockerfile to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
LauroSilveira committed Nov 15, 2023
1 parent 909495e commit 2125883
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM eclipse-temurin:21-jre-alpine
FROM maven:3.9.4-eclipse-temurin-21-alpine AS build
COPY . .
RUN mvn clean package

FROM eclipse-temurin:21-jre-alpine
## Arguments used with github secrets
ARG JWT_SECRET
ARG DATABASE_PRO
Expand All @@ -8,5 +11,5 @@ ARG DATABASE_TEST
## work directory by default
WORKDIR /alura-flix-api
## copy all files from target and put in to work directory
COPY target/alura-flix-api-0.0.1-SNAPSHOT.jar alura-flix-api.jar
COPY --from=build target/alura-flix-api-0.0.1-SNAPSHOT.jar alura-flix-api.jar
ENTRYPOINT ["java", "-jar", "alura-flix-api.jar"]

0 comments on commit 2125883

Please sign in to comment.