npm install in dockerfile
All checks were successful
Deploy to Server / deploy (push) Successful in 1m20s
All checks were successful
Deploy to Server / deploy (push) Successful in 1m20s
This commit is contained in:
@@ -41,13 +41,6 @@ jobs:
|
|||||||
# Note: Changed 'onedev' to 'origin'. Update if your Gitea remote is named differently.
|
# Note: Changed 'onedev' to 'origin'. Update if your Gitea remote is named differently.
|
||||||
git pull origin main
|
git pull origin main
|
||||||
|
|
||||||
npm install
|
|
||||||
npm audit fix
|
|
||||||
cd server
|
|
||||||
npm install
|
|
||||||
npm audit fix
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
echo "==> Running Build..."
|
echo "==> Running Build..."
|
||||||
# If this build fails, 'set -e' aborts the script instantly.
|
# If this build fails, 'set -e' aborts the script instantly.
|
||||||
# Your existing containers will NOT be touched, keeping the site up.
|
# Your existing containers will NOT be touched, keeping the site up.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# ---- Build stage ----
|
# ---- Build stage ----
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY server/package.json server/package-lock.json ./
|
COPY server/package.json server/package-lock.json* ./
|
||||||
RUN npm ci
|
RUN npm install && npm audit fix
|
||||||
COPY server/src ./src
|
COPY server/src ./src
|
||||||
COPY server/tsconfig.json ./
|
COPY server/tsconfig.json ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
@@ -11,7 +11,7 @@ RUN npm run build
|
|||||||
FROM node:22-alpine
|
FROM node:22-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY --from=builder /app/dist ./dist
|
||||||
COPY server/package.json server/package-lock.json ./
|
COPY server/package.json server/package-lock.json* ./
|
||||||
RUN npm ci --omit=dev
|
RUN npm install --omit=dev
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
CMD ["node", "dist/index.js"]
|
CMD ["node", "dist/index.js"]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# ---- Build stage ----
|
# ---- Build stage ----
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json* ./
|
||||||
RUN npm ci
|
RUN npm install && npm audit fix
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npx vite build
|
RUN npx vite build
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user