2025-05-15 18:31:19 +00:00
|
|
|
FROM node:20-slim
|
|
|
|
|
|
|
|
|
|
# Install pnpm
|
|
|
|
|
RUN npm install -g pnpm@latest
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Copy package files
|
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
|
RUN pnpm i
|
|
|
|
|
|
|
|
|
|
# Copy the rest of the application
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
# Build the application
|
|
|
|
|
ENV NODE_OPTIONS=--max_old_space_size=16384
|
|
|
|
|
RUN pnpm run build
|
2025-05-19 17:06:43 +00:00
|
|
|
|
|
|
|
|
# Default to serving the build directory
|
2026-02-17 20:01:12 +00:00
|
|
|
CMD ["npx", "serve", "-s", "build"]
|
2025-05-19 17:06:43 +00:00
|
|
|
|