refactor: clean up codebase — remove legacy references, optimize dockerfile, prune .env.example, simplify CI/CD

- 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>
This commit is contained in:
asepharyana
2026-07-21 13:27:45 +07:00
co-authored by Claude Opus 4.8
parent 84d6056e5e
commit f465ca261e
34 changed files with 76 additions and 4159 deletions
+2 -15
View File
@@ -1,49 +1,36 @@
# Use cargo-chef for dependency caching
# ── Build stage: cargo-chef for dependency caching ──
FROM lukemathwalker/cargo-chef:latest-rust-1.89.0 AS chef
WORKDIR /app
# Install Node.js if needed for build scripts
RUN apt-get update && apt-get install -y --no-install-recommends \
nodejs \
&& rm -rf /var/lib/apt/lists/*
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
# Utilize buildkit cache mounts for cargo
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/app/target \
cargo chef cook --release --recipe-path recipe.json
# Build application
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
# Final runtime image
# ── Runtime image ──
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
libssl3 \
chromium \
fonts-liberation \
fonts-noto-color-emoji \
&& rm -rf /var/lib/apt/lists/*
# Add non-root user
RUN groupadd -g 1001 appgroup && \
useradd -u 1001 -g appgroup -s /bin/sh appuser
WORKDIR /app
COPY --from=builder /app/scraper /app/scraper
# Run as non-root
USER appuser
EXPOSE 4091