fd15628393
- Dockerfile: add ffmpeg (Alpine). - static.js: new /thumbs/<id> — ffmpeg extracts the first frame (0.5s), caches it next to the file, serves as the video poster (cosmetic; 404s gracefully if ffmpeg unavailable). - static.js: /files now supports HTTP Range (206 Partial Content) + Accept-Ranges, which iOS requires to stream/seek video reliably (fixes the buffer-before-play / multi-tap); media (image/video/audio) now served inline, other files still download. Shared attachment auth refactored into one helper used by /files and /thumbs. - home.html: video poster points at /thumbs/<id>. build batch157. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
24 lines
652 B
Docker
24 lines
652 B
Docker
# BizGaze Support — server image
|
|
# Node 24 ships node:sqlite as a stable built-in (no flag), which db.js relies on.
|
|
FROM node:24-alpine
|
|
|
|
# ffmpeg: server-side video poster thumbnails (see static.js /thumbs/<id>). Small on Alpine.
|
|
RUN apk add --no-cache ffmpeg
|
|
|
|
ENV NODE_ENV=production
|
|
WORKDIR /app/server
|
|
|
|
# Install deps first for layer caching (only `ws`, plus optional nodemailer)
|
|
COPY server/package*.json ./
|
|
RUN npm install --omit=dev --no-audit --no-fund
|
|
|
|
# App source
|
|
COPY server/ ./
|
|
|
|
# Served HTTP port (NPM terminates TLS and proxies here). DB lives on a volume.
|
|
ENV PORT=8090
|
|
ENV DB_PATH=/data/data.db
|
|
EXPOSE 8090
|
|
|
|
CMD ["node", "server.js"]
|