Fix production dependencies and Docker configuration
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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"]
|
||||
@@ -14,13 +14,15 @@
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.3.1",
|
||||
"sqlite3": "^5.1.7",
|
||||
"sqlite": "^5.0.3"
|
||||
"sqlite": "^5.0.3",
|
||||
"multer": "^1.4.5-lts.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/node": "^20.8.2",
|
||||
"@types/cors": "^2.8.13",
|
||||
"@types/sqlite3": "^3.1.11",
|
||||
"@types/multer": "^1.4.7",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
"typescript": "^4.9.5",
|
||||
"jest": "^29.7.0",
|
||||
|
||||
Reference in New Issue
Block a user