Spaces:
Sleeping
Sleeping
pixel3user commited on
Commit ·
3ac2619
1
Parent(s): f64c30c
Update Farm2Market demo frontend
Browse files- .dockerignore +5 -0
- Dockerfile +18 -0
- README.md +3 -4
- nginx.conf +11 -0
.dockerignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
| 2 |
+
dist
|
| 3 |
+
*.tsbuildinfo
|
| 4 |
+
.git
|
| 5 |
+
.gitignore
|
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20-alpine AS build
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
|
| 4 |
+
COPY package*.json ./
|
| 5 |
+
RUN npm ci
|
| 6 |
+
|
| 7 |
+
COPY . .
|
| 8 |
+
RUN npm run build
|
| 9 |
+
|
| 10 |
+
FROM nginx:1.27-alpine AS runtime
|
| 11 |
+
|
| 12 |
+
# Serve SPA from port 7860 (Hugging Face Spaces default for Docker apps)
|
| 13 |
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
| 14 |
+
COPY --from=build /app/dist /usr/share/nginx/html
|
| 15 |
+
|
| 16 |
+
EXPOSE 7860
|
| 17 |
+
|
| 18 |
+
CMD ["nginx", "-g", "daemon off;"]
|
README.md
CHANGED
|
@@ -3,9 +3,8 @@ title: Farm2Market Agent Workspace
|
|
| 3 |
emoji: 🌾
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
app_file: dist/index.html
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
|
@@ -19,4 +18,4 @@ Demo Space for Farm2Market AI capabilities:
|
|
| 19 |
- Invoice AI extraction studio
|
| 20 |
- Marketplace discovery and ranking
|
| 21 |
|
| 22 |
-
This Space runs a Vite + React frontend
|
|
|
|
| 3 |
emoji: 🌾
|
| 4 |
colorFrom: green
|
| 5 |
colorTo: blue
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
|
|
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
|
|
|
| 18 |
- Invoice AI extraction studio
|
| 19 |
- Marketplace discovery and ranking
|
| 20 |
|
| 21 |
+
This Space runs a Vite + React frontend with Docker + Nginx.
|
nginx.conf
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
server {
|
| 2 |
+
listen 7860;
|
| 3 |
+
server_name _;
|
| 4 |
+
|
| 5 |
+
root /usr/share/nginx/html;
|
| 6 |
+
index index.html;
|
| 7 |
+
|
| 8 |
+
location / {
|
| 9 |
+
try_files $uri $uri/ /index.html;
|
| 10 |
+
}
|
| 11 |
+
}
|