# Use official Node.js image with TypeScript
FROM node:23-alpine3.20

# Set the working directory
WORKDIR /app

# Copy package.json and install dependencies
COPY package.json package-lock.json ./

RUN npm install

# Copy the rest of the app
COPY . .

COPY /src/assets /assets

# Build TypeScript files
RUN npm run build

# Expose port
EXPOSE 3000

# Start the app
CMD ["node", "dist/server.js"]
