feat: add ci & fix some bug
All checks were successful
dev middleware install / deploy (push) Successful in 20s

This commit is contained in:
2026-05-14 22:45:35 +08:00
parent c58ad923c5
commit 37b16ebe5f
7 changed files with 131 additions and 0 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
# ===== build stage =====
FROM registry.merlin.xin/library/maven:4.0.0-rc-5-eclipse-temurin-17 AS builder
WORKDIR /app
COPY pom.xml .
RUN --mount=type=cache,target=/root/.m2 mvn -B -q dependency:go-offline
COPY . .
RUN --mount=type=cache,target=/root/.m2 mvn -B -q package -DskipTests
# ===== runtime stage =====
FROM registry.merlin.xin/library/eclipse-temurin:17-jre-alpine
# >>> Install debug tools <<<
#RUN apk update && apk add --no-cache \
# curl \
# bind-tools \
# busybox-extras \
# iproute2 \
# tcpdump \
# net-tools
WORKDIR /app
COPY --from=builder /app/target/*.jar app.jar
RUN addgroup -S spring && adduser -S spring -G spring
RUN mkdir -p /app/uploads/photo \
&& chown -R spring:spring /app/uploads
USER spring
ENTRYPOINT ["java","-jar","/app/app.jar","--spring.config.location=file:/app/application.yml"]