# Use Node.js 20 Alpine as the base image for a lightweight container FROM node:20-alpine # Install git (required for cloning the repository) and clean npm cache RUN apk add --no-cache git && \ npm cache clean --force && \ npm install -g npm@10.8.2 # Clone the repository directly into the working directory RUN git clone https://github.com/testingol/ckptw-wabot/ /home/node/tav WORKDIR /home/node/tav # Create necessary directories and set permissions COPY package*.json ./ RUN chmod -R 777 /home/node/tav/ RUN yarn install && yarn add @mengkodingan/ckptw # Copy any local custom files (if applicable, e.g., your bot code) # Uncomment this line if you have local modifications to include COPY . . # Expose any necessary ports (optional, adjust if your bot uses a specific port) # EXPOSE 3000 # Define the command to start the application CMD ["npm", "start"]