feat: add pnpm build step to Dockerfile
Add Node.js and pnpm to build stage to run `pnpm build:all` before Jekyll build. This ensures all assets are properly built before site generation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -2,18 +2,28 @@
|
|||||||
FROM ruby:3.4.1-alpine AS builder
|
FROM ruby:3.4.1-alpine AS builder
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN apk add --no-cache build-base
|
RUN apk add --no-cache build-base nodejs npm
|
||||||
|
|
||||||
|
# Enable corepack for pnpm
|
||||||
|
RUN corepack enable
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy Gemfile and install dependencies
|
# Copy package files and install Node dependencies
|
||||||
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
# Copy Gemfile and install Ruby dependencies
|
||||||
COPY Gemfile Gemfile.lock ./
|
COPY Gemfile Gemfile.lock ./
|
||||||
RUN bundle install
|
RUN bundle install
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Build assets with pnpm
|
||||||
|
RUN pnpm build:all
|
||||||
|
|
||||||
# Build Jekyll site
|
# Build Jekyll site
|
||||||
RUN bundle exec jekyll build
|
RUN bundle exec jekyll build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user