# Use Node.js 20 Alpine as the base image for a lightweight container FROM node:20-alpine # Set the working directory inside the container WORKDIR /app # 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.git . && \ npm install --omit=dev # Create necessary directories and set permissions RUN mkdir -p ./session ./downloads ./state && \ chmod -R 777 ./session ./downloads ./state ./database.json # 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"]