From d3d7a95bdcb1205970632efb697e1346227dd7f9 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 13 Sep 2025 21:52:22 +0500 Subject: [PATCH] . --- Dockerfile | 8 +++----- src/main/resources/application.yaml | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index c06b180..e4db24c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ WORKDIR /app COPY ./pom.xml ./ RUN mvn dependency:resolve COPY . . -RUN mvn clean install -# -DskipTests +RUN mvn clean install -DskipTests FROM openjdk:21-jdk-slim @@ -17,12 +16,11 @@ RUN mkdir /dumps && chown appuser:appgroup /dumps # Set the working directory WORKDIR /app -# Copy the application jar and .env file from the build stage +# Copy the application jar from the build stage COPY --from=build /app/target/*.jar app.jar -COPY --from=build /app/.env .env # Change ownership of the application files to the non-root user -RUN chown appuser:appgroup app.jar .env +RUN chown appuser:appgroup app.jar # Switch to the non-root user USER appuser diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 17a072d..96f1f16 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -2,9 +2,9 @@ spring: application: name: konturai datasource: - url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://92.38.48.166:5433/konturai} + url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://db:5432/konturai} username: ${POSTGRES_USER:postgres} - password: ${POSTGRES_PASSWORD:password} + password: ${POSTGRES_PASSWORD:konturai2024} driver-class-name: org.postgresql.Driver jpa: hibernate: