Files
Giancarmine SalucciandClaude Fable 5.1 5a74898445
Build & Push Docker Image / test-and-build (push) Successful in 1m16s
feat(extraction): go through the ig-keeper gateway, drop Playwright and yt-dlp
Caption and thumbnail now come from the ig-keeper gateway
(GET /v1/instagram/post/{shortcode}), the one real browser that holds the
account's session. The in-app Playwright scraper with its seven caption
strategies, the stealth plugin, Alpine chromium, the yt-dlp thumbnail path,
the shared session mount and IG_SESSION_* are removed. extraction.ts keeps
its public types, cleanText() and the progress/retry contract, so the SSE
endpoint and the queue are unchanged.

Config: IG_GATEWAY_URL + IG_GATEWAY_TOKEN. A dead session or a non-post
URL is non-retriable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 21:04:47 +02:00

37 lines
1.6 KiB
Docker

# syntax=docker/dockerfile:1
# ── stage: tester ────────────────────────────────────────────────────────────
FROM node:24-alpine AS tester
WORKDIR /app
COPY package*.json .npmrc ./
RUN --mount=type=secret,id=gitea_npm \
GITEA_NPM_TOKEN="$(cat /run/secrets/gitea_npm 2>/dev/null)" npm ci
COPY . .
# Run only server-side unit tests; browser (Playwright) tests require a full
# Chromium environment that is not available in the Alpine build stage.
RUN npm run test:unit -- --run --project=server
# ── stage: builder ───────────────────────────────────────────────────────────
FROM node:24-alpine AS builder
WORKDIR /app
COPY package*.json .npmrc ./
RUN --mount=type=secret,id=gitea_npm \
GITEA_NPM_TOKEN="$(cat /run/secrets/gitea_npm 2>/dev/null)" npm ci
COPY . .
RUN npm run build
# ── stage: runner ────────────────────────────────────────────────────────────
FROM node:24-alpine AS runner
WORKDIR /app
# Instagram is reached only through the ig-keeper gateway: no chromium, no yt-dlp here.
COPY package*.json .npmrc ./
RUN --mount=type=secret,id=gitea_npm \
GITEA_NPM_TOKEN="$(cat /run/secrets/gitea_npm 2>/dev/null)" npm ci --omit=dev
COPY --from=builder /app/build ./build
EXPOSE 3000
ENV NODE_ENV=production
CMD ["node", "-e", "import('./build/index.js')"]