Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20-slim
|
| 2 |
+
|
| 3 |
+
# Install git and other dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
git \
|
| 6 |
+
curl \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
+
|
| 9 |
+
# Create app directory
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Clone the private repository using environment variables
|
| 13 |
+
# GIT_USER, GIT_TOKEN, and GIT_REPO should be set as Hugging Face Space secrets
|
| 14 |
+
RUN git clone https://${GIT_USER}:${GITHUB_TOKEN}@github.com/${GIT_USER}/${GIT_REPO}.git .
|
| 15 |
+
|
| 16 |
+
# Install dependencies
|
| 17 |
+
RUN npm install
|
| 18 |
+
|
| 19 |
+
# Expose Hugging Face Spaces default port
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Start the application
|
| 23 |
+
CMD ["node", "server.js"]
|