FROM node:22.14.0-alpine
LABEL authors="FIRMAN STIM"

# Set working directory
WORKDIR /app/src

# Copy package files first to leverage Docker cache
COPY src/package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY src/ .

# Set host and port
ENV HOST=0.0.0.0
ENV PORT=3000

# Expose port
EXPOSE 3000

# Start development server
CMD ["npm", "run", "dev"]