LearnSpace: full-stack educational whiteboard platform
Node.js/Express backend + vanilla JS frontend. Features: real-time collaborative whiteboard (SSE), multi-page support, LaTeX formulas, shapes/connectors, coordinate systems, number lines, compass, zoom/pan, Catmull-Rom pencil smoothing, ruler/protractor with rotation & resize controls, minimap navigation overlay, auto-measurements, multi-page thumbnails sidebar, PNG export, page templates. Student/teacher workflows: classes, assignments, library, dashboard. Mobile responsive. SQLite (better-sqlite3). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
# ── Stage 1: install production deps ─────────────────────────────────────
|
||||
FROM node:22-alpine AS deps
|
||||
WORKDIR /app/backend
|
||||
COPY backend/package.json backend/package-lock.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# ── Stage 2: runtime ─────────────────────────────────────────────────────
|
||||
FROM node:22-alpine
|
||||
LABEL maintainer="BQ-System"
|
||||
|
||||
RUN apk add --no-cache sqlite tini
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/backend/node_modules ./backend/node_modules
|
||||
COPY backend/package.json ./backend/
|
||||
COPY backend/src ./backend/src
|
||||
COPY backend/seed.js ./backend/seed.js
|
||||
COPY frontend ./frontend
|
||||
COPY js ./js
|
||||
|
||||
# Ensure data & uploads dirs exist (volumes mount here)
|
||||
RUN mkdir -p /app/backend/data /app/backend/uploads /app/backups
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD wget -qO- http://localhost:3000/api/health || exit 1
|
||||
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
CMD ["node", "backend/src/server.js"]
|
||||
Reference in New Issue
Block a user