ac91737c63
Browser-only PDF editor (React + Vite + pdf-lib + pdf.js + tesseract.js), plus a multi-stage Dockerfile that builds the SPA and serves it from nginx on port 80 with a /health endpoint for Coolify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
485 B
Docker
15 lines
485 B
Docker
FROM node:22-bookworm-slim AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
# prebuild copies pdf.js cmaps/fonts into public/pdfjs, then tsc + vite build -> dist/
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine
|
|
RUN apk add --no-cache curl
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD curl -fsS -o /dev/null http://127.0.0.1/health || exit 1
|