| # Gunakan base image Node yang stabil | |
| FROM node:20-bullseye | |
| # Install dependencies, ttyd, dan cloudflared | |
| RUN apt-get update && apt-get install -y ttyd wget curl \ | |
| && wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb \ | |
| && dpkg -i cloudflared-linux-amd64.deb \ | |
| && rm cloudflared-linux-amd64.deb | |
| # Setup working directory | |
| WORKDIR /app | |
| COPY . . | |
| # Install dependencies bot (jika ada package.json) | |
| RUN npm install | |
| RUN npm install -g pm2 | |
| # Expose port wajib HF | |
| EXPOSE 7860 | |
| # Gunakan script entrypoint untuk multi-process | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| CMD ["/start.sh"] | |