npm install in dockerfile
All checks were successful
Deploy to Server / deploy (push) Successful in 1m20s

This commit is contained in:
2026-04-10 00:38:47 -05:00
parent 00541df679
commit 25fcaec204
3 changed files with 6 additions and 13 deletions

View File

@@ -41,13 +41,6 @@ jobs:
# Note: Changed 'onedev' to 'origin'. Update if your Gitea remote is named differently.
git pull origin main
npm install
npm audit fix
cd server
npm install
npm audit fix
cd ..
echo "==> Running Build..."
# If this build fails, 'set -e' aborts the script instantly.
# Your existing containers will NOT be touched, keeping the site up.

View File

@@ -1,8 +1,8 @@
# ---- Build stage ----
FROM node:22-alpine AS builder
WORKDIR /app
COPY server/package.json server/package-lock.json ./
RUN npm ci
COPY server/package.json server/package-lock.json* ./
RUN npm install && npm audit fix
COPY server/src ./src
COPY server/tsconfig.json ./
RUN npm run build
@@ -11,7 +11,7 @@ RUN npm run build
FROM node:22-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY server/package.json server/package-lock.json ./
RUN npm ci --omit=dev
COPY server/package.json server/package-lock.json* ./
RUN npm install --omit=dev
EXPOSE 3001
CMD ["node", "dist/index.js"]

View File

@@ -1,8 +1,8 @@
# ---- Build stage ----
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY package.json package-lock.json* ./
RUN npm install && npm audit fix
COPY . .
RUN npx vite build