# Use Node.js 22 Alpine as the base image
FROM node:22-alpine

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Build the Vue.js application
RUN npm run build

# Install a simple HTTP server for serving static content
RUN npm install -g http-server

# Expose the port the app runs on
EXPOSE 8080
EXPOSE 3000
# Start the application
CMD ["npm", "run", "dev:all"]