FINALLY FIXED DATABASE ACCESS OH MY FUCKING I'M EXHAUSTED

This commit is contained in:
2025-12-11 21:54:26 +01:00
parent 46f2cf2d55
commit 35f5978849
6 changed files with 212 additions and 35 deletions

View File

@@ -10,10 +10,17 @@ COPY src ./src
RUN gradle clean bootJar --no-daemon
FROM eclipse-temurin:21-jdk-alpine
WORKDIR /app
COPY --from=build /app/build/libs/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
WORKDIR /app
RUN apk add --no-cache bash netcat-openbsd
COPY --from=build /app/build/libs/*.jar app.jar
COPY ./api-init/wait-for-it.sh ./wait-for-it.sh
RUN chmod +x wait-for-it.sh
ENTRYPOINT ["bash", "./wait-for-it.sh", "mongodb:27017", "--timeout=60", "--strict", "--", "java", "-jar", "app.jar"]