Skip to content
Snippets Groups Projects
Commit 84d9d801 authored by echicken's avatar echicken :chicken:
Browse files

cron

parent 7332a0f3
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,9 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true ...@@ -5,7 +5,9 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Install Google Chrome Stable and fonts # Install Google Chrome Stable and fonts
# Note: this installs the necessary libs to make the browser work with Puppeteer. # Note: this installs the necessary libs to make the browser work with Puppeteer.
RUN apt-get update && apt-get install curl gnupg -y \ RUN apt-get update \
&& apt-get install curl gnupg -y \
&& apt-get install cron -y --no-install-recommends \
&& curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \ && apt-get update \
...@@ -14,7 +16,9 @@ RUN apt-get update && apt-get install curl gnupg -y \ ...@@ -14,7 +16,9 @@ RUN apt-get update && apt-get install curl gnupg -y \
WORKDIR /app WORKDIR /app
COPY . /app/ COPY . /app/
COPY cron /etc/cron.d/tasks_cronjob
RUN npm install RUN npm install
RUN npm run build RUN npm run build
CMD ["npm", "start"] # CMD ["npm", "start"]
\ No newline at end of file CMD ["/bin/bash", "-c", "chmod 644 /etc/cron.d/tasks_cronjob && cron && cd /app && npm start"]
\ No newline at end of file
cron 0 → 100644
0 4 * * 0 cd /app && npm run ingest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment