# Use official Node.js LTS image as base
FROM node:22.14.0-alpine

# Set working directory
WORKDIR /app

# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN npm ci

# Copy all source files
COPY . .

# Build the Nuxt app
RUN npm run build

# Expose port 3000
EXPOSE 3001

# Start the app in preview mode
CMD ["npm", "run", "dev"]
