Set up Gradle Kotlin project with Ktor, Docker, and CI pipeline
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
# Stage 1: Build
|
||||
FROM eclipse-temurin:25-jdk-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN chmod +x gradlew
|
||||
RUN ./gradlew shadowJar --no-daemon
|
||||
|
||||
# Stage 2: Run
|
||||
FROM eclipse-temurin:25-jre-alpine
|
||||
WORKDIR /app
|
||||
# Wir kopieren das fertige Jar aus der Build-Stage
|
||||
COPY --from=build /app/build/libs/*-all.jar app.jar
|
||||
EXPOSE 8081
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
Reference in New Issue
Block a user