Fix issue #29: Migrate from npm to pnpm workspace
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 17:01:02 +00:00
parent b02ecca7d4
commit 9820a375dc
17 changed files with 10053 additions and 15178 deletions

View File

@@ -1,6 +1,9 @@
# ---------- Build Stage ----------
FROM node:20-alpine AS builder
# pnpm is served by corepack and pinned by "packageManager" in the root package.json
RUN corepack enable
ARG NUXT_PUBLIC_GIT_COMMIT
ARG NUXT_PUBLIC_GIT_TAG
ARG NUXT_PUBLIC_GIT_BRANCH
@@ -11,18 +14,21 @@ ENV NUXT_PUBLIC_GIT_BRANCH=$NUXT_PUBLIC_GIT_BRANCH
WORKDIR /app
# Copy package files
COPY package*.json ./
# Copy the workspace manifests (pnpm needs every package.json of the workspace)
COPY pnpm-workspace.yaml pnpm-lock.yaml package.json ./
COPY backend/package.json ./backend/
COPY frontend/package.json ./frontend/
COPY discord-bot/package.json ./discord-bot/
# Install dependencies
RUN npm install
# Install the dependencies of the frontend package
RUN pnpm install --frozen-lockfile --filter ./frontend...
# Copy project files
ARG CACHEBUST=1
COPY . .
COPY frontend ./frontend
# Build the Nuxt app
RUN npm run build
RUN pnpm --filter ./frontend run build
# ---------- Production Stage ----------
FROM node:20-alpine
@@ -30,7 +36,7 @@ FROM node:20-alpine
WORKDIR /app
# Copy built output
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/frontend/.output ./.output
# Expose Nuxt port
EXPOSE 3000