# Use the official Node.js image as the base image
FROM node:18.17.0

# Python Docker Image
RUN apt-get update
RUN apt-get install -y python3 python3-pip
COPY requirements.txt .
RUN pip3 install -r requirements.txt --break-system-packages


# Set the working directory inside the container
WORKDIR /src/app

# Copy package.json and package-lock.json to the container
COPY package*.json ./
COPY .npmrc ./

# Install the project dependencies
RUN npm install

# Copy the rest of the application code to the container
COPY . .

# Start the Nest.js application
CMD ["npm", "run", "scheduler:prod"]
