From c5975d5d33d6c78ab62d0111d0b5ea3f44ff1647 Mon Sep 17 00:00:00 2001 From: EunbeenDev Date: Fri, 31 Jan 2025 23:24:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[HOTFIX]=20=EC=B5=9C=EA=B7=BC=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=89=B4=EC=8A=A4=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=8B=9C=20=EC=B5=9C=EC=8B=A0=EC=88=9C=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../movelog/domain/news/domain/repository/NewsRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/movelog/domain/news/domain/repository/NewsRepository.java b/src/main/java/com/movelog/domain/news/domain/repository/NewsRepository.java index 74a7293..a1e824d 100644 --- a/src/main/java/com/movelog/domain/news/domain/repository/NewsRepository.java +++ b/src/main/java/com/movelog/domain/news/domain/repository/NewsRepository.java @@ -19,7 +19,7 @@ public interface NewsRepository extends JpaRepository { "JOIN n.keyword k " + "WHERE k.user = :user " + "AND n.createdAt > :createdAt " + - "ORDER BY n.createdAt ASC") + "ORDER BY n.createdAt DESC") Page findRecentNewsByUser( @Param("user") User user, @Param("createdAt") LocalDateTime createdAt, From 907681c5d963de381627de15bf25a489f43ca693 Mon Sep 17 00:00:00 2001 From: EunbeenDev Date: Sat, 1 Feb 2025 16:19:54 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[HOTFIX]=20Timezone=EC=9D=84=20KST=EB=A1=9C?= =?UTF-8?q?=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index adbc827..2f0b213 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,11 @@ FROM gradle:7.6-jdk17-alpine as builder WORKDIR /build +# Set TimeZone to Asia/Seoul for build stage +RUN apk add --no-cache tzdata && \ + ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \ + echo "Asia/Seoul" > /etc/timezone + # Copy Gradle settings COPY build.gradle settings.gradle /build/ @@ -15,8 +20,20 @@ RUN gradle build -x test --parallel --info # Final runtime image FROM openjdk:17.0-slim WORKDIR /app + +# Set TimeZone to Asia/Seoul for runtime stage +RUN apt-get update && apt-get install -y tzdata && \ + ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \ + echo "Asia/Seoul" > /etc/timezone + COPY --from=builder /build/build/libs/*-SNAPSHOT.jar ./app.jar + +# Ensure correct permissions RUN chown nobody:nogroup /app USER nobody EXPOSE 8080 -ENTRYPOINT ["java", "-jar", "/app/app.jar"] + +# Set the default TimeZone for the JVM +ENV TZ=Asia/Seoul +ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul", "-jar", "/app/app.jar"] +