Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -11,3 +11,44 @@ pinned: false
|
|
11 |
# Transformer Notes App
|
12 |
|
13 |
A React app to annotate and save notes on the Transformer architecture. Click 'Save Notes' to download a screenshot of your filled-in diagram.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
# Transformer Notes App
|
12 |
|
13 |
A React app to annotate and save notes on the Transformer architecture. Click 'Save Notes' to download a screenshot of your filled-in diagram.
|
14 |
+
|
15 |
+
---
|
16 |
+
|
17 |
+
## **How to Fix**
|
18 |
+
|
19 |
+
You need to update your Dockerfile to use port 7860 for both the `EXPOSE` and the `serve` command.
|
20 |
+
|
21 |
+
### **Correct Dockerfile**
|
22 |
+
|
23 |
+
```dockerfile
|
24 |
+
# Stage 1: Build the app
|
25 |
+
FROM node:20 AS build
|
26 |
+
|
27 |
+
WORKDIR /app
|
28 |
+
COPY . .
|
29 |
+
RUN npm install
|
30 |
+
RUN npm run build
|
31 |
+
|
32 |
+
# Stage 2: Serve the app
|
33 |
+
FROM node:20 AS serve
|
34 |
+
|
35 |
+
WORKDIR /app
|
36 |
+
RUN npm install -g serve
|
37 |
+
COPY --from=build /app/dist ./dist
|
38 |
+
|
39 |
+
EXPOSE 7860
|
40 |
+
CMD ["serve", "-s", "dist", "-l", "7860"]
|
41 |
+
```
|
42 |
+
|
43 |
+
---
|
44 |
+
|
45 |
+
## **What to Do Next**
|
46 |
+
|
47 |
+
1. **Update your Dockerfile** as shown above.
|
48 |
+
2. **Commit and push** the change to your repository (or re-upload to Hugging Face Spaces).
|
49 |
+
3. Hugging Face will rebuild your Space, and your app should now start and be detected as healthy.
|
50 |
+
|
51 |
+
---
|
52 |
+
|
53 |
+
Would you like me to make this change for you?
|
54 |
+
If yes, I’ll update your Dockerfile right now!
|