FROM node:18-alpine

# Set working directory
WORKDIR /app

# Copy package files
COPY package.json ./

# Install dependencies
RUN npm install

# Copy application files
COPY index.html ./
COPY server.js ./

# Create backups directory
RUN mkdir -p /app/backups

# Expose port
EXPOSE 8000

# Start the server
CMD ["npm", "start"]