21 lines
446 B
Docker
21 lines
446 B
Docker
FROM node:18-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY backend/package*.json ./
|
|
|
|
# Install dependencies with npm ci for reproducibility
|
|
RUN npm ci --only=production || npm install --production
|
|
|
|
# Verify critical dependencies are installed
|
|
RUN test -d node_modules/express || (echo "ERROR: express not installed" && exit 1)
|
|
|
|
# Copy application code
|
|
COPY backend/src ./src
|
|
COPY frontend ./frontend
|
|
|
|
EXPOSE 4001
|
|
|
|
CMD ["node", "src/server.js"]
|