mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 22:26:19 +00:00
Compare commits
3 commits
df85e43b5e
...
198e51fc97
Author | SHA1 | Date | |
---|---|---|---|
198e51fc97 | |||
fcc7449307 | |||
143c87c433 |
2 changed files with 9 additions and 7 deletions
|
@ -1,17 +1,17 @@
|
|||
FROM oven/bun:1-alpine AS base
|
||||
FROM docker.io/oven/bun:1-alpine AS base
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM base AS builder
|
||||
ENV NODE_ENV=production
|
||||
COPY . .
|
||||
RUN bun install --frozen-lockfile \
|
||||
&& bun build scraper/cli.ts --target=bun --outfile=/tmp/cli.build.js \
|
||||
&& rm -rf node_modules/
|
||||
&& bun build scraper/cli.ts --target=bun --outfile=/tmp/cli.build.js \
|
||||
&& 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 \
|
||||
&& chmod +x /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
|
||||
COPY --from=builder /usr/src/app/db-datos/drizzle /bin/drizzle
|
||||
|
@ -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"]
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue