Skip to content

Commit

Permalink
Try to fix scheduling by reverting to old Docker image build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithandir committed Sep 19, 2024
1 parent f5a5aed commit 88531bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ COPY / /opt/src/newsfeed/

WORKDIR /opt/src/newsfeed
RUN --mount=type=cache,target=/root/.m2 mvn clean install -DskipTests=true -P production
RUN java -Djarmode=layertools -jar /opt/src/newsfeed/target/newsfeed-0.0.1-SNAPSHOT.jar extract

#------------------------------------------------

FROM eclipse-temurin:22-jre-alpine
VOLUME /tmp
Expand All @@ -22,10 +23,6 @@ RUN addgroup -S newsfeed && adduser -S newsfeed -G newsfeed
USER newsfeed

ARG DEPENDENCY=/opt/src/newsfeed
COPY --from=builder ${DEPENDENCY}/*.jar app.jar

COPY --from=builder ${DEPENDENCY}/dependencies/ ./
COPY --from=builder ${DEPENDENCY}/spring-boot-loader/ ./
COPY --from=builder ${DEPENDENCY}/snapshot-dependencies/ ./
COPY --from=builder ${DEPENDENCY}/application/ ./

ENTRYPOINT ["java","--enable-preview", "org.springframework.boot.loader.launch.JarLauncher"]
ENTRYPOINT ["java","--enable-preview", "-jar", "app.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class Scheduler {

@PostConstruct
public void init() {
LOG.info("Initialising Feed List");
rssFeeds.put("http://feeds.feedburner.com/ilovecyclingde", "de");
rssFeeds.put("http://feeds.feedburner.com/inrng/inrng0", "en");
rssFeeds.put("http://feeds.feedburner.com/shutuplegsde", "de");
Expand Down Expand Up @@ -118,6 +119,7 @@ private void initIconCache() {
}
}
}));
LOG.info("Icon cache initialised");
}

@Scheduled(fixedDelay = 15, initialDelay = 1, timeUnit = TimeUnit.MINUTES)
Expand Down

0 comments on commit 88531bb

Please sign in to comment.