-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #490 from PBH-BTN/master
6.2.3 (6.2.2's hotfix)
- Loading branch information
Showing
10 changed files
with
34 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,5 +33,4 @@ jobs: | |
name: maven-dist | ||
path: | | ||
target/*.jar | ||
target/media/*.exe | ||
id: project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ jobs: | |
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile-CI | ||
file: ./Dockerfile | ||
push: true | ||
platforms: | | ||
linux/amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,7 @@ jobs: | |
- uses: actions/download-artifact@v4 | ||
with: | ||
name: maven-dist | ||
path: target/ | ||
path: target | ||
- name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set Up Buildx | ||
|
@@ -151,7 +151,7 @@ jobs: | |
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
file: ./Dockerfile-Release | ||
push: true | ||
platforms: | | ||
linux/amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,22 @@ | ||
# 构建前端 | ||
FROM --platform=$BUILDPLATFORM docker.io/node:alpine AS frontend-build | ||
COPY ./webui /build/webui | ||
WORKDIR /build/webui | ||
RUN corepack enable pnpm && \ | ||
pnpm i && \ | ||
pnpm run build | ||
|
||
# 下载依赖 | ||
FROM maven:3-eclipse-temurin-21-alpine AS backend-build | ||
COPY pom.xml /build/pom.xml | ||
WORKDIR /build | ||
# fetch all dependencies | ||
RUN mvn dependency:go-offline -B -T 1.5C | ||
FROM --platform=$BUILDPLATFORM docker.io/maven:3.9.9-eclipse-temurin-21-alpine AS build | ||
|
||
# 构建后端 | ||
COPY src/ /build/ | ||
COPY .git /build/.git | ||
COPY . /build | ||
WORKDIR /build | ||
# 把前端打包好的文件拉来 | ||
COPY --from=frontend-build /build/webui/dist src/main/resources/static | ||
RUN ls -l | ||
RUN apk add --update curl git && \ | ||
mvn -B clean package --file pom.xml -T 1.5C | ||
RUN apk add --update npm curl git && \ | ||
curl -L https://unpkg.com/@pnpm/self-installer | node && \ | ||
cd webui && \ | ||
pnpm i && \ | ||
npm run build && \ | ||
cd .. && \ | ||
mv webui/dist src/main/resources/static && \ | ||
mvn -B clean package --file pom.xml -T 1.5C -P thin-sqlite-packaging | ||
|
||
# 最终阶段,只要成品 | ||
FROM docker.io/azul/zulu-openjdk-alpine:21.0.4-21.36-jre | ||
LABEL maintainer="https://github.com/PBH-BTN/PeerBanHelper" | ||
USER 0 | ||
ENV TZ=UTC | ||
WORKDIR /app | ||
VOLUME /tmp | ||
COPY --from=backend-build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar | ||
COPY --from=build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar | ||
ENV PATH="${JAVA_HOME}/bin:${PATH}" | ||
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"] | ||
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters