Spaces:
Runtime error
Runtime error
| # Use a modern, slim, and secure version of Node.js based on Debian | |
| FROM node:20-bookworm-slim | |
| # Install trusted SSL certificates, git, and other essential system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ca-certificates \ | |
| git \ | |
| ffmpeg \ | |
| libwebp-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Force git to use HTTPS instead of the private SSH protocol | |
| RUN git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the dependency list first to leverage Docker's layer caching | |
| COPY package*.json ./ | |
| # Install project dependencies | |
| RUN npm install --omit=dev | |
| # Copy the rest of the bot's code into the container | |
| COPY . . | |
| RUN mkdir -p ./session ./downloads ./auth_info_baileys && \ | |
| chmod -R 777 ./session ./downloads ./auth_info_baileys | |
| # The command to run when the container starts | |
| CMD ["npm", "start"] | |