FROM node:21-alpine3.18
WORKDIR /app
COPY ./app /app
RUN npm install
RUN npm run build  # Compile TypeScript files
EXPOSE 3000
RUN adduser -D app
USER app
CMD ["npm", "start"]  # Use npm start which points to dist/index.js