- Traefik: remove asephstech/asephscloud SSL certs, fix api.insecure, add ping healthcheck - .env.example: prune from 145 to 30 vars (remove Firebase, Discord, Coolify, etc.) - scraper.Dockerfile: remove Node.js & Chromium from runtime, add healthcheck - CI/CD: remove orphan container ref, commented blocks, fix lint workflow - infra: remove mysql config (no active service), clean up middleware config - root: remove .nvmrc (dup), renovate.json (use dependabot), simplify Makefile - scripts: fix legacy package refs, simplify update-deps to use bun - docs: remove stale handoff-log, quality-gates, superpowers designs, archived files - compose: add healthchecks to traefik, redis, and scraper-api services Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
38 lines
1.0 KiB
Docker
38 lines
1.0 KiB
Docker
# ── Build stage: cargo-chef for dependency caching ──
|
|
FROM lukemathwalker/cargo-chef:latest-rust-1.89.0 AS chef
|
|
WORKDIR /app
|
|
|
|
FROM chef AS planner
|
|
COPY apps/scraper .
|
|
RUN cargo chef prepare --recipe-path recipe.json
|
|
|
|
FROM chef AS builder
|
|
COPY --from=planner /app/recipe.json recipe.json
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
--mount=type=cache,target=/app/target \
|
|
cargo chef cook --release --recipe-path recipe.json
|
|
|
|
COPY apps/scraper .
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
--mount=type=cache,target=/app/target \
|
|
cargo build --release && \
|
|
cp target/release/scraper /app/scraper
|
|
|
|
# ── Runtime image ──
|
|
FROM debian:bookworm-slim AS runtime
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
libssl3 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN groupadd -g 1001 appgroup && \
|
|
useradd -u 1001 -g appgroup -s /bin/sh appuser
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/scraper /app/scraper
|
|
USER appuser
|
|
|
|
EXPOSE 4091
|
|
CMD ["./scraper"]
|