Spaces:
Paused
Paused
File size: 631 Bytes
c267e06 f1c34f7 a39f69d c267e06 f1c34f7 a39f69d 09035c1 c267e06 4e59bbe c267e06 f1c34f7 a39f69d c267e06 a39f69d f1c34f7 a39f69d c267e06 a39f69d 4e59bbe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # 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"] |