Skip to content

Commit

Permalink
feat(backend): switch to library version of argon2
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalHonegger committed Nov 13, 2024
1 parent 4957d3d commit 33bd693
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Backend/security/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ kotlin {
dependencies {
implementation(project(":Backend:domain"))
implementation(libs.java.jwt)
implementation(libs.argon2.jvm)
implementation(libs.argon2.jvm.nolibs)
implementation(libs.kotlinx.datetime)
testImplementation(libs.argon2.jvm)
testImplementation(testLibs.kotlin.test)
testImplementation(testLibs.mockk)
}
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
FROM node:22-alpine AS buildFrontend
FROM node:22-alpine AS build_frontend
RUN corepack enable
COPY ./Frontend /home/node/src
WORKDIR /home/node/src
RUN pnpm i --frozen-lockfile
RUN pnpm build
RUN pnpm build --outDir ./dist

FROM eclipse-temurin:23-jdk-alpine AS buildBackend
FROM eclipse-temurin:23-jdk-alpine AS build_backend
COPY . /home/gradle/src
COPY --from=buildFrontend /home/node/src/dist /home/gradle/src/Backend/bootstrap/src/main/resources/static
COPY --from=build_frontend /home/node/src/dist /home/gradle/src/Backend/bootstrap/src/main/resources/static
WORKDIR /home/gradle/src
RUN ./gradlew shadowJar --no-daemon

FROM eclipse-temurin:23-jre-alpine
RUN apk add --no-cache argon2-libs
EXPOSE 8080:8080
RUN mkdir /app
COPY --from=buildBackend /home/gradle/src/Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
COPY --from=build_backend /home/gradle/src/Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
ENTRYPOINT ["java","-jar","/app/jasstracker.jar"]
1 change: 1 addition & 0 deletions DockerfileBuiltLocally
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM eclipse-temurin:23-jre-alpine
RUN apk add --no-cache argon2-libs
EXPOSE 8080:8080
RUN mkdir /app
COPY ./Backend/bootstrap/build/libs/*.jar /app/jasstracker.jar
Expand Down
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {

dependencyResolutionManagement {
versionCatalogs {
val kotlin = "2.1.0-Beta2"
val kotlin = "2.1.0-RC"
val mockk = "1.13.13"
val ktor = "3.0.1"
val logback = "1.5.12"
Expand Down Expand Up @@ -51,6 +51,7 @@ dependencyResolutionManagement {
library("postgresql", "org.postgresql", "postgresql").version(postgresql)
library("jooq", "org.jooq", "jooq").version(jooq)
library("java-jwt", "com.auth0", "java-jwt").version(javaJwt)
library("argon2-jvm-nolibs", "de.mkammerer", "argon2-jvm-nolibs").version(argon2)
library("argon2-jvm", "de.mkammerer", "argon2-jvm").version(argon2)
library("kotlin-reflect", "org.jetbrains.kotlin", "kotlin-reflect").version(kotlin)

Expand Down

0 comments on commit 33bd693

Please sign in to comment.