Update Dockerfile
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -5,8 +5,8 @@ WORKDIR /app
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
# Install ALL dependencies (including dev dependencies for build)
|
||||
RUN npm ci --include=dev
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
@@ -14,8 +14,11 @@ COPY . .
|
||||
# Build TypeScript
|
||||
RUN npm run build
|
||||
|
||||
# Remove source files to reduce image size (optional)
|
||||
# RUN rm -rf src tsconfig.json
|
||||
# Verify dist was created
|
||||
RUN ls -la dist/ || (echo "ERROR: dist not created!" && exit 1)
|
||||
|
||||
# Clean up dev dependencies to reduce image size (optional)
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
# Start the app
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user