Download Dockerfile from felix-fx/fx-1: direct link, hf CLI and curl.
- Browser
- Download file 992 Bytes
-
https://huggingface.co/felix-fx/fx-1/resolve/main/Dockerfile
- Command line
-
hf download hf://felix-fx/fx-1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/felix-fx/fx-1/resolve/main/Dockerfile
992 Bytes
| FROM node:20-alpine AS builder | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| RUN npm ci --only=production && npm ci | |
| COPY . . | |
| RUN npm run build | |
| FROM nginx:alpine | |
| # تثبيت بايثون والمكتبات اللازمة للبوت | |
| RUN apk add --no-cache python3 py3-pip && \ | |
| pip3 install --no-cache-dir python-telegram-bot requests --break-system-packages | |
| # نسخ ملفات الموقع | |
| COPY --from=builder /app/dist /usr/share/nginx/html | |
| COPY nginx.conf /etc/nginx/conf.d/default.conf | |
| # نسخ ملف البوت | |
| COPY bot.py /app/bot.py | |
| # إنشاء سكربت تشغيل مزدوج (Nginx + Bot) | |
| RUN echo '#!/bin/sh' > /app/start.sh && \ | |
| echo 'nginx' >> /app/start.sh && \ | |
| echo 'python3 /app/bot.py' >> /app/start.sh && \ | |
| chmod +x /app/start.sh | |
| EXPOSE 8080 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD wget --quiet --tries=1 --spider http://localhost:8080 || exit 1 | |
| # تشغيل الموقع والبوت معاً | |
| CMD ["/app/start.sh"] | |