fix: Install all dependencies in server Dockerfile for TypeScript build, then prune dev deps
This commit is contained in:
@@ -10,8 +10,8 @@ WORKDIR /app
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --omit=dev
|
||||
# Install all dependencies (including dev for build)
|
||||
RUN npm install
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
@@ -19,6 +19,9 @@ COPY . .
|
||||
# Build TypeScript
|
||||
RUN npm run build
|
||||
|
||||
# Remove dev dependencies after build
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
# Expose port
|
||||
EXPOSE 2567
|
||||
|
||||
|
||||
Reference in New Issue
Block a user