# Base Node image FROM node:18-alpine # Install nginx for static frontend RUN apk add --no-cache nginx # Create directories WORKDIR /app COPY server ./server COPY app ./app # Install backend dependencies WORKDIR /app/server RUN npm install # Expose Ports EXPOSE 8080 80 # Start both backend and frontend CMD sh -c "node /app/server/server.js & nginx -g 'daemon off;'"