Compare commits
2 commits
d87af982f7
...
eef6b98171
Author | SHA1 | Date | |
---|---|---|---|
eef6b98171 | |||
ab8b65f099 |
2 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
# Stage 1: Build bot
|
||||
FROM docker.io/maven:3.9-eclipse-temurin-19 AS maven
|
||||
FROM docker.io/maven:3.9-eclipse-temurin-20 AS maven
|
||||
WORKDIR /app
|
||||
# Copy the dependency specifications
|
||||
COPY pom.xml .
|
||||
|
@ -9,7 +9,7 @@ COPY migration/pom.xml migration/
|
|||
COPY web/pom.xml web/
|
||||
|
||||
# Adding default Maven arguments
|
||||
ENV MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress"
|
||||
ENV MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress -Dmaven.test.skip"
|
||||
|
||||
# Resolve dependencies for shared libraries
|
||||
RUN mvn $MAVEN_CLI_OPTS -pl db -am dependency:go-offline
|
||||
|
@ -28,20 +28,20 @@ COPY migration migration
|
|||
RUN mvn $MAVEN_CLI_OPTS -pl migration package
|
||||
|
||||
# Stage 2: Create final web
|
||||
FROM docker.io/eclipse-temurin:19-jdk-jammy AS web
|
||||
FROM docker.io/eclipse-temurin:20-jdk-jammy AS web
|
||||
WORKDIR /app
|
||||
COPY --from=maven /app/web/target/web-*-fat.jar /app/web.jar
|
||||
EXPOSE 8080
|
||||
CMD ["java", "-jar", "/app/web.jar"]
|
||||
|
||||
# Stage 2: Create final migration
|
||||
FROM docker.io/eclipse-temurin:19-jdk-jammy AS migration
|
||||
FROM docker.io/eclipse-temurin:20-jdk-jammy AS migration
|
||||
WORKDIR /app
|
||||
COPY --from=maven /app/migration/target/migration-*-fat.jar /app/migration.jar
|
||||
CMD ["java", "-jar", "/app/migration.jar"]
|
||||
|
||||
# Stage 2: Create final bot
|
||||
FROM docker.io/eclipse-temurin:19-jdk-jammy AS bot
|
||||
FROM docker.io/eclipse-temurin:20-jdk-jammy AS bot
|
||||
WORKDIR /app
|
||||
COPY --from=maven /app/bot/target/bot-*-fat.jar /app/bot.jar
|
||||
CMD ["java", "-jar", "/app/bot.jar"]
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -27,8 +27,8 @@
|
|||
</licenses>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>19</maven.compiler.source>
|
||||
<maven.compiler.target>19</maven.compiler.target>
|
||||
<maven.compiler.source>20</maven.compiler.source>
|
||||
<maven.compiler.target>20</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<jackson.version>2.15.1</jackson.version>
|
||||
</properties>
|
||||
|
|
Loading…
Reference in a new issue