Compare commits
4 commits
d4ca9336b4
...
ca6a913578
Author | SHA1 | Date | |
---|---|---|---|
ca6a913578 | |||
e56e9d0ee3 | |||
f7e8b2356f | |||
1a432e9f3d |
4 changed files with 78 additions and 14 deletions
13
.dockerignore
Normal file
13
.dockerignore
Normal file
|
@ -0,0 +1,13 @@
|
|||
*
|
||||
!db/src/
|
||||
!db/pom.xml
|
||||
!bot/src/
|
||||
!bot/pom.xml
|
||||
!migration/src/
|
||||
!migration/pom.xml
|
||||
!web/src/
|
||||
!web/pom.xml
|
||||
!pom.xml
|
||||
web/src/ui/node_modules
|
||||
web/src/ui/node
|
||||
web/src/ui/dist
|
|
@ -11,5 +11,29 @@ pipeline:
|
|||
from_secret: docker_token
|
||||
dockerfile: Containerfile
|
||||
target: bot
|
||||
repo: git.hhhammer.de/hamburghammer/flyclt-deploy
|
||||
repo: git.hhhammer.de/hamburghammer/dchat/bot
|
||||
tags: latest
|
||||
|
||||
build-web-amd64:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.hhhammer.de
|
||||
username: ci
|
||||
password:
|
||||
from_secret: docker_token
|
||||
dockerfile: Containerfile
|
||||
target: web
|
||||
repo: git.hhhammer.de/hamburghammer/dchat/web
|
||||
tags: latest
|
||||
|
||||
build-migration-amd64:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.hhhammer.de
|
||||
username: ci
|
||||
password:
|
||||
from_secret: docker_token
|
||||
dockerfile: Containerfile
|
||||
target: migration
|
||||
repo: git.hhhammer.de/hamburghammer/dchat/migration
|
||||
tags: latest
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
platform: linux/arm*
|
||||
platform: linux/amd64
|
||||
# branch: main
|
||||
|
||||
pipeline:
|
||||
build-bot-arm:
|
||||
build-bot-arm64:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.hhhammer.de
|
||||
|
@ -11,5 +11,32 @@ pipeline:
|
|||
from_secret: docker_token
|
||||
dockerfile: Containerfile
|
||||
target: bot
|
||||
repo: git.hhhammer.de/hamburghammer/flyclt-deploy
|
||||
repo: git.hhhammer.de/hamburghammer/dchat/bot
|
||||
tags: latest
|
||||
platform: linux/arm64
|
||||
|
||||
build-web-arm64:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.hhhammer.de
|
||||
username: ci
|
||||
password:
|
||||
from_secret: docker_token
|
||||
dockerfile: Containerfile
|
||||
target: web
|
||||
repo: git.hhhammer.de/hamburghammer/dchat/web
|
||||
tags: latest
|
||||
platform: linux/arm64
|
||||
|
||||
build-migration-arm64:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: git.hhhammer.de
|
||||
username: ci
|
||||
password:
|
||||
from_secret: docker_token
|
||||
dockerfile: Containerfile
|
||||
target: migration
|
||||
repo: git.hhhammer.de/hamburghammer/dchat/migration
|
||||
tags: latest
|
||||
platform: linux/arm64
|
||||
|
|
|
@ -9,39 +9,39 @@ COPY migration/pom.xml migration/
|
|||
COPY web/pom.xml web/
|
||||
|
||||
# Adding default Maven arguments
|
||||
ENV MAVEN_CLI_OPTS="--batch-mode"
|
||||
ENV MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress"
|
||||
|
||||
# Resolve dependencies for shared libraries
|
||||
RUN mvn -pl db -am dependency:go-offline
|
||||
RUN mvn $MAVEN_CLI_OPTS -pl db -am dependency:go-offline
|
||||
# Install the shared libraries in the local Maven repo (`.m2`)
|
||||
# This will also install the `root` module.
|
||||
COPY db db
|
||||
RUN mvn -pl db -am install
|
||||
RUN mvn $MAVEN_CLI_OPTS -pl db -am install
|
||||
# Resolve dependencies for modules without dependencies to each other
|
||||
RUN mvn dependency:go-offline
|
||||
RUN mvn $MAVEN_CLI_OPTS dependency:go-offline
|
||||
# Build modules
|
||||
COPY web web
|
||||
RUN mvn -pl web package
|
||||
RUN mvn $MAVEN_CLI_OPTS -pl web package
|
||||
COPY bot bot
|
||||
RUN mvn -pl bot package
|
||||
RUN mvn $MAVEN_CLI_OPTS -pl bot package
|
||||
COPY migration migration
|
||||
RUN mvn -pl migration package
|
||||
RUN mvn $MAVEN_CLI_OPTS -pl migration package
|
||||
|
||||
# Stage 2: Create final web
|
||||
FROM docker.io/eclipse-temurin:19-jdk-alpine AS web
|
||||
FROM docker.io/eclipse-temurin:19-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-alpine AS migration
|
||||
FROM docker.io/eclipse-temurin:19-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-alpine AS bot
|
||||
FROM docker.io/eclipse-temurin:19-jdk-jammy AS bot
|
||||
WORKDIR /app
|
||||
COPY --from=maven /app/bot/target/bot-*-fat.jar /app/bot.jar
|
||||
CMD ["java", "-jar", "/app/bot.jar"]
|
||||
|
|
Loading…
Reference in a new issue