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.
fix: question generator + fix for front?
Co-authored-by: Gonzalo Suárez Losada <[email protected]>
- Loading branch information
1 parent
bb81584
commit 117cc12
Showing
3 changed files
with
56 additions
and
2 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 |
---|---|---|
@@ -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 /api/target/QuestionGenerator-1.0-SNAPSHOT.jar app.jar | ||
ENTRYPOINT ["java","-jar","app.jar"] |