Update Dockerfile to add HEIF support dependencies and adjust TimelineSection styles for better layout and image handling

This commit is contained in:
denshooter
2026-02-22 00:27:12 +01:00
parent eb28501b2e
commit 49d8798e11
2 changed files with 33 additions and 9 deletions
+27 -3
View File
@@ -2,7 +2,29 @@ FROM node:22-alpine AS builder
WORKDIR /app
# Install build dependencies for sharp and libvips with HEIF support
# See: https://sharp.pixelplumbing.com/install#alpine
RUN apk add --no-cache \
build-base \
pkgconf \
# libvips runtime dependencies
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
tiff-dev \
libexif-dev \
lcms2-dev \
glib-dev \
# libvips itself and its HEIF support
vips-dev \
libheif-dev \
# Codecs for HEIF
libde265-dev \
x265-dev
COPY package*.json ./
# Tell sharp to use the system-wide libvips we just installed with HEIF support
ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1
RUN npm ci
COPY . .
@@ -25,9 +47,11 @@ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
# Copy sharp native binaries (needed for HEIC→JPEG conversion)
COPY --from=builder /app/node_modules/sharp ./node_modules/sharp
COPY --from=builder /app/node_modules/@img ./node_modules/@img
# Sharp native binaries are no longer copied directly,
# as sharp is built against system libvips and is part of node_modules copied with the standalone app.
# If sharp is needed outside standalone, node_modules would need to be copied.
# COPY --from=builder /app/node_modules/sharp ./node_modules/sharp
# COPY --from=builder /app/node_modules/@img ./node_modules/@img
RUN mkdir -p /app/data/uploads/photos /app/data/uploads/videos /app/data/uploads/music \
&& chown -R nextjs:nodejs /app/data