# Development Dockerfile for Nuxt 3 admin frontend
FROM node:20-slim

WORKDIR /app

# Copy package files
COPY package*.json ./
COPY nuxt.config.ts ./
COPY tsconfig.json ./

# Install dependencies
RUN npm install --no-audit --progress=false

# Copy source code
COPY . .

# Expose Nuxt development port
EXPOSE 8502

# Start development server
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=8502

CMD ["npm", "run", "dev", "--", "-o"]