mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 14:16:19 +00:00
arreglar container scraper
This commit is contained in:
parent
66fc8767ef
commit
78e0f3cdee
3 changed files with 13 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
FROM docker.io/oven/bun:1-alpine AS base
|
||||
FROM cgr.dev/chainguard/wolfi-base AS base
|
||||
WORKDIR /usr/src/app
|
||||
RUN apk add --no-cache bun libgcc
|
||||
|
||||
FROM base as build
|
||||
ENV NODE_ENV=production
|
||||
|
@ -8,19 +9,19 @@ RUN bun install --frozen-lockfile
|
|||
RUN bun build scraper/cli.ts --target=bun --outfile=/tmp/cli.build.js
|
||||
|
||||
# nightly porque usamos tl con `simd` activado
|
||||
FROM ghcr.io/rust-lang/rust:nightly-bookworm-slim as rs-build
|
||||
WORKDIR /usr/src/app
|
||||
COPY scraper-rs/ .
|
||||
RUN apt-get update && apt-get install -y libsqlite3-dev && rm -rf /var/lib/apt/lists/*
|
||||
RUN cargo install --path .
|
||||
FROM base as rs-build
|
||||
RUN apk add --no-cache rust build-base sqlite-dev
|
||||
|
||||
FROM docker.io/oven/bun:1-slim
|
||||
RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/*
|
||||
COPY scraper-rs/ .
|
||||
RUN cargo install --locked --path .
|
||||
|
||||
FROM base
|
||||
RUN apk add --no-cache sqlite
|
||||
|
||||
# Scraper
|
||||
COPY --from=build /tmp/cli.build.js /bin/scraper
|
||||
COPY --from=build /usr/src/app/db-datos/drizzle /bin/drizzle
|
||||
COPY --from=rs-build /usr/local/cargo/bin/scraper-rs /usr/local/bin/scraper-rs
|
||||
COPY --from=rs-build /root/.cargo/bin/scraper-rs /usr/local/bin/scraper-rs
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV DB_PATH=/db/db.db
|
||||
|
|
3
scraper-rs/Cargo.lock
generated
3
scraper-rs/Cargo.lock
generated
|
@ -1366,7 +1366,8 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|||
[[package]]
|
||||
name = "tl"
|
||||
version = "0.7.7"
|
||||
source = "git+https://github.com/evertedsphere/tl?branch=patch-1#56711166588fa6c7729a08e5740dca2526436316"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5e993a1c7c32fdf90a308cec4d457f507b2573acc909bd6e7a092321664fdb3"
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
|
|
|
@ -27,7 +27,7 @@ serde = { version = "1.0.193", features = ["derive"] }
|
|||
serde_json = "1.0.109"
|
||||
simple-error = "0.3.0"
|
||||
thiserror = "1.0.56"
|
||||
tl = { git = "https://github.com/evertedsphere/tl", branch = "patch-1", features = ["simd"] }
|
||||
tl = "0.7.7"
|
||||
tokio = { version = "1.35.1", features = ["full"] }
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.3"
|
||||
|
|
Loading…
Reference in a new issue