暂存提交

This commit is contained in:
2026-07-30 18:16:57 +08:00
parent 2f4e159356
commit 72d86cf1d2
6 changed files with 527 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
FROM eclipse-temurin:17-jre-alpine
RUN apk add --no-cache curl \
&& addgroup -S app \
&& adduser -S -G app -u 10001 app
WORKDIR /app
ARG JAR_FILE
COPY --chown=app:app ${JAR_FILE} /app/app.jar
USER app
ENV JAVA_OPTS="-XX:MaxRAMPercentage=75.0 -XX:+ExitOnOutOfMemoryError -Dfile.encoding=UTF-8" \
SERVER_PORT=8080
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${SERVER_PORT}/actuator/health" || exit 1
ENTRYPOINT ["sh", "-c", "exec java $JAVA_OPTS -jar /app/app.jar"]