Initial commit: Loma PDF Editor with Coolify deploy setup

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>
This commit is contained in:
chaloemphong
2026-11-19 10:02:45 +07:00
commit ac91737c63
54 changed files with 8994 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
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