Build and Deploy / build-and-deploy (push) Failing after 1m50s
Spring Boot 3.3 backend + React frontend bundled into one jar, Postgres via Hibernate ddl-auto, Radarr/Sonarr/Jellyfin/Plex/TMDB integrations with runtime-editable settings, webhook-driven batch recompute, and k8s/Gitea CI-CD for deployment into the arr namespace on k3s. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
30 lines
858 B
Docker
30 lines
858 B
Docker
# --- Build stage: builds the React frontend and the Spring Boot jar ---
|
|
FROM maven:3.9-eclipse-temurin-17 AS build
|
|
WORKDIR /build
|
|
|
|
# Cache maven deps
|
|
COPY pom.xml .
|
|
RUN mvn -q -B dependency:go-offline || true
|
|
|
|
COPY frontend ./frontend
|
|
COPY src ./src
|
|
|
|
# mvn package runs frontend-maven-plugin (npm install + build) then copies
|
|
# frontend/dist into src/main/resources/static before compiling the jar.
|
|
RUN mvn -q -B clean package -DskipTests
|
|
|
|
# --- Runtime stage: minimal JRE only ---
|
|
FROM eclipse-temurin:17-jre-alpine
|
|
WORKDIR /app
|
|
|
|
RUN addgroup -S recommendarr && adduser -S recommendarr -G recommendarr
|
|
COPY --from=build /build/target/recommendarr.jar app.jar
|
|
USER recommendarr
|
|
|
|
EXPOSE 8080
|
|
|
|
# JVM heap sized modestly for the target host; overridable via JAVA_OPTS.
|
|
ENV JAVA_OPTS="-Xms128m -Xmx512m"
|
|
|
|
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]
|