-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Upgrade NodeJS to v16 and krawler to latest version #23
- Loading branch information
cnouguier
committed
Jun 8, 2022
1 parent
5d5f770
commit d7e2c19
Showing
9 changed files
with
60 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,18 @@ FROM kalisio/krawler:${KRAWLER_TAG} AS krawler | |
# | ||
# Make the job image using the krawler image alias | ||
# | ||
FROM node:12-buster-slim | ||
FROM node:16-buster-slim | ||
LABEL maintainer="Kalisio <[email protected]>" | ||
|
||
ENV CRON="0 */15 * * * *" | ||
|
||
# Copy Krawler from the Krawler image alias | ||
COPY --from=krawler /opt/krawler /opt/krawler | ||
RUN cd /opt/krawler && yarn link && yarn link @kalisio/krawler | ||
WORKDIR /opt/krawler | ||
RUN yarn link && yarn link @kalisio/krawler | ||
|
||
# Required as yarn does not seem to set it correctly | ||
RUN chmod u+x /usr/local/bin/krawler | ||
|
||
# Install the job | ||
COPY jobfile-observations.js . | ||
|
@@ -24,5 +28,4 @@ COPY jobfile-observations.js . | |
HEALTHCHECK --interval=1m --timeout=10s --start-period=1m CMD node /opt/krawler/healthcheck.js | ||
|
||
# Run the job | ||
ENV NODE_PATH=/opt/krawler/node_modules | ||
CMD node /opt/krawler --cron "$CRON" jobfile-observations.js | ||
CMD krawler --cron "$CRON" jobfile-observations.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,18 @@ FROM kalisio/krawler:${KRAWLER_TAG} AS krawler | |
# | ||
# Make the job image using the krawler image alias | ||
# | ||
FROM node:12-buster-slim | ||
FROM node:16-buster-slim | ||
LABEL maintainer="Kalisio <[email protected]>" | ||
|
||
ENV CRON="0 0 * * * *" | ||
|
||
# Copy Krawler from the Krawler image alias | ||
COPY --from=krawler /opt/krawler /opt/krawler | ||
RUN cd /opt/krawler && yarn link && yarn link @kalisio/krawler | ||
WORKDIR /opt/krawler | ||
RUN yarn link && yarn link @kalisio/krawler | ||
|
||
# Required as yarn does not seem to set it correctly | ||
RUN chmod u+x /usr/local/bin/krawler | ||
|
||
# Install the job | ||
COPY jobfile-predictions.js . | ||
|
@@ -24,5 +28,4 @@ COPY jobfile-predictions.js . | |
HEALTHCHECK --interval=1m --timeout=10s --start-period=1m CMD node /opt/krawler/healthcheck.js | ||
|
||
# Run the job | ||
ENV NODE_PATH=/opt/krawler/node_modules | ||
CMD node /opt/krawler --run --cron "$CRON" jobfile-predictions.js | ||
CMD krawler --run --cron "$CRON" jobfile-predictions.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,18 @@ FROM kalisio/krawler:${KRAWLER_TAG} AS krawler | |
# | ||
# Make the job image using the krawler image alias | ||
# | ||
FROM node:12-buster-slim | ||
FROM node:16-buster-slim | ||
LABEL maintainer="Kalisio <[email protected]>" | ||
|
||
ENV CRON="0 0 0 * * *" | ||
|
||
# Copy Krawler from the Krawler image alias | ||
COPY --from=krawler /opt/krawler /opt/krawler | ||
RUN cd /opt/krawler && yarn link && yarn link @kalisio/krawler | ||
WORKDIR /opt/krawler | ||
RUN yarn link && yarn link @kalisio/krawler | ||
|
||
# Required as yarn does not seem to set it correctly | ||
RUN chmod u+x /usr/local/bin/krawler | ||
|
||
# Install the job | ||
COPY jobfile-stations.js . | ||
|
@@ -24,5 +28,4 @@ COPY jobfile-stations.js . | |
HEALTHCHECK --interval=1m --timeout=10s --start-period=1m CMD node /opt/krawler/healthcheck.js | ||
|
||
# Run the job | ||
ENV NODE_PATH=/opt/krawler/node_modules | ||
CMD node /opt/krawler --run --cron "$CRON" jobfile-stations.js | ||
CMD krawler --run --cron "$CRON" jobfile-stations.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters