выполнение работы

This commit is contained in:
altngg
2026-11-24 20:26:37 +03:00
parent 0ab3a341aa
commit e16f7b9974
29 changed files with 1582 additions and 45 deletions
+32
View File
@@ -0,0 +1,32 @@
FROM maven:3.9.9-eclipse-temurin-21 AS builder
WORKDIR /build
COPY pom.xml .
RUN mvn dependency:go-offline -B
COPY src ./src
RUN mvn clean package -DskipTests
FROM eclipse-temurin:21-jre
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends wget \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /build/target/messenger-lab1-1.0.0.jar app.jar
ENV PORT=8080
EXPOSE 8080
HEALTHCHECK --interval=10s \
--timeout=3s \
--start-period=20s \
--retries=5 \
CMD wget -q --spider http://localhost:8080/health/ready || exit 1
ENTRYPOINT ["java", "-jar", "app.jar"]