Add Docker build and deploy pipeline
All checks were successful
deploy-backend / deploy (push) Successful in 8m24s

This commit is contained in:
SlimusMinus
2026-10-07 22:56:56 +03:00
parent efdae92787
commit 818c8f6a11
6 changed files with 462 additions and 7 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM eclipse-temurin:25-jdk AS build
WORKDIR /app
COPY . .
RUN sed -i 's/\r$//' gradlew \
&& chmod +x gradlew \
&& ./gradlew bootJar --no-daemon -x test \
&& cp "$(ls build/libs/*.jar | grep -v plain | head -n1)" /app/app.jar
FROM eclipse-temurin:25-jre
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -r -u 1001 app
WORKDIR /app
COPY --from=build /app/app.jar app.jar
USER app
EXPOSE 8080
ENTRYPOINT ["java", "-Xmx768m", "-jar", "app.jar"]