Fix production dependencies and Docker configuration

This commit is contained in:
2025-05-01 08:28:00 -04:00
parent 2d594217f1
commit 530b9aa7b3
2 changed files with 8 additions and 6 deletions

View File

@@ -32,11 +32,11 @@ FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
COPY backend/package*.json ./
# Install production dependencies only
# Copy package files and install dependencies
COPY package*.json ./
COPY backend/package*.json ./backend/
RUN npm install --production
RUN cd backend && npm install --production
# Copy built files from builder stage
COPY --from=builder /app/backend/dist ./dist
@@ -50,4 +50,4 @@ RUN mkdir -p uploads/wallpapers
EXPOSE 3000
# Start the application
CMD ["npm", "start"]
CMD ["node", "dist/index.js"]