Mr-Thop commited on
Commit
7621694
Β·
1 Parent(s): 3db086d

Change Docker

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -3,12 +3,13 @@ FROM node:18-alpine AS frontend-build
3
 
4
  WORKDIR /app/frontend
5
 
6
- COPY frontend/package*.json ./
7
- RUN npm ci --silent
8
 
9
  COPY frontend/ ./
10
  # Use relative /api path so it works behind any domain
11
  ENV REACT_APP_API_URL=/api
 
12
  RUN npm run build
13
 
14
  # ── Stage 2: Production image ─────────────────────────────────────────────────
@@ -18,7 +19,7 @@ WORKDIR /app
18
 
19
  # Copy backend deps and install
20
  COPY package*.json ./
21
- RUN npm ci --omit=dev
22
 
23
  # Copy backend source
24
  COPY src/ ./src/
 
3
 
4
  WORKDIR /app/frontend
5
 
6
+ COPY frontend/package.json frontend/package-lock.json ./
7
+ RUN npm install --legacy-peer-deps
8
 
9
  COPY frontend/ ./
10
  # Use relative /api path so it works behind any domain
11
  ENV REACT_APP_API_URL=/api
12
+ ENV CI=false
13
  RUN npm run build
14
 
15
  # ── Stage 2: Production image ─────────────────────────────────────────────────
 
19
 
20
  # Copy backend deps and install
21
  COPY package*.json ./
22
+ RUN npm install --omit=dev --legacy-peer-deps
23
 
24
  # Copy backend source
25
  COPY src/ ./src/