# --------------------------------------------------
# Dockerfile
# Course Website (Node.js + Express)
# Author: Maksym Yaremko
# Base Image: Official Node.js LTS
# --------------------------------------------------

# Use official Node.js LTS image
FROM node:20-alpine

# Create app directory
WORKDIR /usr/src/app

# Copy package files first (better caching)
COPY package*.json ./

# Install dependencies
RUN npm install --production

# Copy application source
COPY . .

# Expose application port
EXPOSE 3000

# Start the server
CMD ["node", "server.js"]
