generated from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
117 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
FROM maven:3.8.1-openjdk-17 AS build | ||
# Compile api | ||
WORKDIR /api | ||
COPY . /api | ||
WORKDIR /api | ||
RUN mvn install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM maven:3.8.1-openjdk-17 AS build | ||
LABEL authors="dario" | ||
# Compile api | ||
COPY . /questiongenerator | ||
WORKDIR /questiongenerator | ||
RUN mvn install | ||
RUN mvn clean package | ||
|
||
FROM amazoncorretto:17 AS runtime | ||
# Copy the compiled jar file from the build stage | ||
ARG DATABASE_USER | ||
ARG DATABASE_PASSWORD | ||
|
||
# Set environment variables | ||
ENV DATABASE_URL jdbc:postgresql://WIQ_DB:5432/wiq | ||
ENV DATABASE_USER $DATABASE_USER | ||
ENV DATABASE_PASSWORD $DATABASE_PASSWORD | ||
COPY --from=build /questiongenerator/target/QuestionGenerator-1.0-SNAPSHOT-jar-with-dependencies.jar app.jar | ||
ENTRYPOINT ["java","-jar","app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters