api / Dockerfile
srinetwork's picture
Update Dockerfile
4e59bbe verified
Raw History Blame Contribute Delete
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"]