docker: usar debian

This commit is contained in:
Cat /dev/Nulo 2024-06-17 21:13:24 -03:00
parent 74640df37e
commit 25810578eb
2 changed files with 7 additions and 6 deletions

View file

@ -12,4 +12,6 @@ Dockerfile
*.warc.zst
.git
scraper/debug/
*/target/
*/target/
scraper-rs/target/
*.db*

View file

@ -1,12 +1,11 @@
FROM cgr.dev/chainguard/wolfi-base AS base
FROM docker.io/node:20 AS base
WORKDIR /usr/src/app
FROM base as build
RUN apk add --no-cache nodejs npm
RUN npm install --global pnpm
COPY db-datos/package.json db-datos/package.json
COPY sitio/package.json sitio/package.json
COPY pnpm-lock.yaml pnpm-workspace.yaml .
COPY pnpm-lock.yaml pnpm-workspace.yaml ./
RUN cd sitio && pnpm install
COPY . .
COPY db-datos/drizzle .
@ -16,7 +15,7 @@ RUN cd sitio && \
FROM base
ENV NODE_ENV=production
RUN apk add --no-cache nodejs npm jq sqlite
RUN apt-get update && apt-get install -y jq sqlite3 && apt-get clean
# Sitio
COPY --from=build /usr/src/app/sitio/package.json package.real.json
@ -28,4 +27,4 @@ COPY --from=build /usr/src/app/db-datos/drizzle drizzle
ENV DB_PATH=/db/db.db
EXPOSE 3000
CMD ["node", "."]
CMD ["node", "."]