Files
nmemmertandClaude Sonnet 4.6 6b4bd88943 feat: video support + Memories music choices
Videos:
- Worker ingests .mp4 .mov .m4v .avi .mkv .webm .3gp via ffmpeg/ffprobe
  (frame extract → sharp resize, same thumbnail pipeline as photos)
- DB: media_type + duration columns with migration
- GET /api/videos returns all indexed videos
- GET /api/photos/:id/video streams original file with Range support
  for browser seek/scrub
- VideosView: 16:9 thumbnail grid, play-button overlay, duration badge
- Full-screen player: native <video controls>, ESC to close
- Library tab now excludes videos (dedicated Videos tab)
- Dockerfile: adds ffmpeg to runtime stage

Memories music choices:
- Three styles: ⚡ Upbeat (G-major, default), 🌙 Dreamy (A-minor),
  🎬 Cinematic (D-minor, dual-oscillator richness)
- Shared Web Audio engine (reverb, LPF, pad + melody)
- Style picker in header; active style icon shown in slideshow bar

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-18 11:01:30 -04:00

43 lines
1.3 KiB
Docker

# ── Stage 1: build client ────────────────────────────────────────────────────
FROM node:22-alpine AS builder
# Build tools needed by better-sqlite3 native addon
RUN apk add --no-cache python3 make g++
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# ── Stage 2: runtime ─────────────────────────────────────────────────────────
FROM node:22-alpine
RUN apk add --no-cache python3 py3-pip make g++ ffmpeg && \
pip3 install icloudpd --break-system-packages
WORKDIR /app
COPY package*.json ./
# Reinstall in the runtime image so native addons compile for this arch
RUN npm ci --omit=dev
COPY --from=builder /app/dist ./dist
COPY worker ./worker
COPY server ./server
COPY scripts ./scripts
ENV PORT=3000 \
DB_PATH=/data/library.db \
POSTER_DIR=/data/posters \
PHOTO_DIR=/photos \
NODE_ENV=production
EXPOSE 3000
# /data — SQLite database + generated thumbnails (mount a named volume)
# /photos — read-only source photo directory (bind-mount from host)
VOLUME ["/data", "/photos"]
CMD ["node", "server/index.js"]