Spaces:
Paused
Paused
Download Dockerfile from srinetwork/api: direct link, hf CLI and curl.
- Browser
- Download file 631 Bytes
-
https://huggingface.co/spaces/srinetwork/api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/srinetwork/api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/srinetwork/api/resolve/main/Dockerfile
631 Bytes
| # SRI API - Hugging Face Spaces Dockerfile (Fixed) | |
| FROM node:20-slim | |
| WORKDIR /app | |
| # Install Git | |
| RUN apt-get update && apt-get install -y git ca-certificates && rm -rf /var/lib/apt/lists/* | |
| # Accept GitHub token as build argument | |
| ARG GITHUB_TOKEN | |
| # Clone private repo (token not stored in final image) | |
| RUN git clone https://${GITHUB_TOKEN}@github.com/Walukapah/SRIAPI26.git /tmp/repo && \ | |
| cp -r /tmp/repo/* . && \ | |
| rm -rf /tmp/repo .git | |
| # Install dependencies | |
| RUN npm install | |
| # Create public directory | |
| RUN mkdir -p public | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| ENV NODE_ENV=production | |
| ENV GITHUB_TOKEN="" | |
| CMD ["node", "server.js"] |