Compare commits

...

3 commits

Author SHA1 Message Date
198e51fc97 usar busybox crond 2023-12-28 10:50:56 -03:00
fcc7449307 escribir containerfile especificando registry 2023-12-28 10:48:08 -03:00
143c87c433 informar cuando se empieza a scrapear 2023-12-28 10:40:28 -03:00
2 changed files with 9 additions and 7 deletions

View file

@ -1,4 +1,4 @@
FROM oven/bun:1-alpine AS base
FROM docker.io/oven/bun:1-alpine AS base
WORKDIR /usr/src/app
FROM base AS builder
@ -9,8 +9,8 @@ RUN bun install --frozen-lockfile \
&& rm -rf node_modules/
FROM base
RUN apk add --no-cache wget zstd cronie tini
RUN printf "#!/bin/sh\nexec bun /bin/scraper auto" > /etc/periodic/daily/scraper \
RUN apk add --no-cache wget zstd tini
RUN printf "#!/bin/sh\nexec bun /bin/scraper auto\n" > /etc/periodic/daily/scraper \
&& chmod +x /etc/periodic/daily/scraper
COPY --from=builder /tmp/cli.build.js /bin/scraper
@ -23,5 +23,5 @@ ENV NODE_ENV=production
ENV DB_PATH=/db/db.db
ENV LISTS_DIR=/listas/
CMD ["tini", "/usr/sbin/crond", "-n"]
CMD ["tini", "/bin/busybox", "crond", "-f", "-l2"]
# CMD ["bun", "/bin/scraper"]

View file

@ -66,6 +66,8 @@ class Auto {
token: process.env.TELEGRAM_BOT_TOKEN,
chatId: process.env.TELEGRAM_BOT_CHAT_ID,
};
this.inform("[auto] Empezando scrap");
}
async downloadList(supermercado: Supermercado) {