# Backend Dockerfile - Express Data Server
FROM node:20-alpine

WORKDIR /app

# Copy package files from parent (uses express from main package.json)
COPY package*.json ./

# Install only production dependencies
RUN npm ci --only=production

# Copy server code
COPY server/ ./server/

# Create data directory
RUN mkdir -p /data

# Expose Express server port
EXPOSE 3001

# Run Express server
CMD ["node", "server/index.js"]
