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.
Merge pull request #50 from Arquisoft/feat/api/deployment-ready
feat: deployment Github actions, docker compose for Spring API and code cleaning
- Loading branch information
Showing
11 changed files
with
111 additions
and
211 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM maven:3.8.1-openjdk-17 AS build | ||
# Compile api | ||
WORKDIR /api | ||
COPY . /api | ||
WORKDIR /api | ||
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 | ||
ARG JWT_SECRET | ||
|
||
# Set environment variables | ||
ENV DATABASE_URL jdbc:postgresql://WIQ_DB:5432/wiq | ||
ENV DATABASE_USER $DATABASE_USER | ||
ENV DATABASE_PASSWORD $DATABASE_PASSWORD | ||
ENV JWT_SECRET $JWT_SECRET | ||
COPY --from=build /api/target/quiz-api-0.0.1-SNAPSHOT.jar app.jar | ||
ENTRYPOINT ["java","-jar","app.jar"] | ||
|
||
EXPOSE 8080 |
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
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
10 changes: 4 additions & 6 deletions
10
api/src/main/java/lab/en2b/quizapi/auth/dtos/RefreshTokenResponseDto.java
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,20 +1,18 @@ | ||
package lab.en2b.quizapi.auth.dtos; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class RefreshTokenResponseDto { | ||
|
||
private String token; | ||
@JsonProperty("refresh_token") | ||
private String refreshToken; | ||
|
||
public RefreshTokenResponseDto(String accessToken, String refreshToken) { | ||
this.token = accessToken; | ||
this.refreshToken = refreshToken; | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -6,8 +6,4 @@ | |
@SpringBootTest | ||
class QuizApiApplicationTests { | ||
|
||
@Test | ||
void contextLoads() { | ||
} | ||
|
||
} |
Oops, something went wrong.