# syntax=docker/dockerfile:1
FROM node:20-alpine

WORKDIR /app

# Install dependencies
COPY package*.json ./
RUN npm ci --only=production

# Copy application code
COPY server ./server
COPY web ./web
COPY testcases ./testcases
COPY testplans ./testplans

# Create output directory (for generated reports/plans)
RUN mkdir -p output/testplans output/reports

EXPOSE 4321

ENV NODE_ENV=production
ENV PORT=4321

CMD ["node", "server/index.js"]
