chore: update Dockerfiles to ignore scripts during npm install
- Modified Dockerfile for frontend and backend to include the --ignore-scripts flag in npm ci commands, improving build efficiency. - Added a step in the Docker workflow to create the public directory in the staging environment.
This commit is contained in:
@@ -104,6 +104,7 @@ jobs:
|
||||
cp -R "$dir" "$STAGING/"
|
||||
fi
|
||||
done
|
||||
mkdir -p "$STAGING/public"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@ FROM node:22-bookworm-slim AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
COPY packages/contracts/package.json packages/contracts/
|
||||
RUN npm ci --workspace=@mmapp/contracts --include-workspace-root
|
||||
RUN npm ci --workspace=@mmapp/contracts --include-workspace-root --ignore-scripts
|
||||
|
||||
FROM deps AS build
|
||||
COPY packages/contracts packages/contracts
|
||||
@@ -14,7 +14,7 @@ COPY components components
|
||||
COPY lib lib
|
||||
COPY shared shared
|
||||
COPY entities entities
|
||||
COPY public public
|
||||
RUN mkdir -p public
|
||||
COPY hooks hooks
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
RUN npm run build -w @mmapp/contracts \
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
COPY packages/contracts/package.json packages/contracts/
|
||||
COPY backend/package.json backend/
|
||||
RUN npm ci --workspace=@mmapp/contracts --workspace=mikrotik-manager-backend --include-workspace-root
|
||||
RUN npm ci --workspace=@mmapp/contracts --workspace=mikrotik-manager-backend --include-workspace-root --ignore-scripts
|
||||
|
||||
FROM deps AS build
|
||||
COPY packages/contracts packages/contracts
|
||||
|
||||
Reference in New Issue
Block a user