Skip to content

Commit

Permalink
πŸ› Fix: Docker timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
jun108059 committed Nov 9, 2024
1 parent 7a9d350 commit 52eb036
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM openjdk:17-jdk-slim

# tzdata νŒ¨ν‚€μ§€ μ„€μΉ˜ 및 μ‹œκ°„λŒ€ μ„€μ •
RUN apt-get update && apt-get install -y tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime && \
echo "Asia/Seoul" > /etc/timezone

EXPOSE 8080

ARG JAR_FILE=build/libs/*.jar
Expand All @@ -8,4 +13,4 @@ COPY ${JAR_FILE} weski-app.jar
CMD java -Dserver.port=8080 \
-Dspring.datasource.username=master \
-Dspring.datasource.password=master \
-jar /weski-app.jar
-jar /weski-app.jar
4 changes: 2 additions & 2 deletions src/main/kotlin/nexters/weski/batch/WeatherScheduler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class WeatherScheduler(
externalWeatherService.updateCurrentWeather()
}

@Scheduled(cron = "0 30 3 * * *")
@Scheduled(cron = "30 0 0 * * *")
fun scheduledDailyWeatherUpdate() {
externalWeatherService.updateDailyWeather()
}

@Scheduled(cron = "0 10 5 * * *")
@Scheduled(cron = "0 1 0 * * *")
fun scheduledHourlyAndDailyUpdate() {
externalWeatherService.updateHourlyAndDailyWeather()
}
Expand Down

0 comments on commit 52eb036

Please sign in to comment.