This commit is contained in:
root
2025-09-13 21:52:22 +05:00
parent 4757df4998
commit d3d7a95bdc
2 changed files with 5 additions and 7 deletions
+3 -5
View File
@@ -3,8 +3,7 @@ WORKDIR /app
COPY ./pom.xml ./ COPY ./pom.xml ./
RUN mvn dependency:resolve RUN mvn dependency:resolve
COPY . . COPY . .
RUN mvn clean install RUN mvn clean install -DskipTests
# -DskipTests
FROM openjdk:21-jdk-slim FROM openjdk:21-jdk-slim
@@ -17,12 +16,11 @@ RUN mkdir /dumps && chown appuser:appgroup /dumps
# Set the working directory # Set the working directory
WORKDIR /app 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/target/*.jar app.jar
COPY --from=build /app/.env .env
# Change ownership of the application files to the non-root user # 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 # Switch to the non-root user
USER appuser USER appuser
+2 -2
View File
@@ -2,9 +2,9 @@ spring:
application: application:
name: konturai name: konturai
datasource: 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} username: ${POSTGRES_USER:postgres}
password: ${POSTGRES_PASSWORD:password} password: ${POSTGRES_PASSWORD:konturai2024}
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
jpa: jpa:
hibernate: hibernate: