chore: update Dockerfile to skip postinstall scripts during dependency installation

- Modified the dependency installation command to skip postinstall scripts, which require all source files.
- Added a separate command to run the fumadocs-mdx postinstall after the source files are copied, ensuring proper setup.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-12-23 02:09:38 -08:00
parent fd7e43181a
commit 0863899637

View file

@ -28,12 +28,15 @@ COPY surfsense_web/package.json surfsense_web/pnpm-lock.yaml* ./
COPY surfsense_web/source.config.ts ./
COPY surfsense_web/content ./content
# Install dependencies
RUN pnpm install --frozen-lockfile
# Install dependencies (skip postinstall which requires all source files)
RUN pnpm install --frozen-lockfile --ignore-scripts
# Copy source
COPY surfsense_web/ ./
# Run fumadocs-mdx postinstall now that source files are available
RUN pnpm fumadocs-mdx
# Build args for frontend
ARG NEXT_PUBLIC_FASTAPI_BACKEND_URL=http://localhost:8000
ARG NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE=LOCAL