Spaces:
Sleeping
Sleeping
Download frontend/Dockerfile from vishalharkal/BookMind: direct link, hf CLI and curl.
- Browser
- Download file 703 Bytes
-
https://huggingface.co/spaces/vishalharkal/BookMind/resolve/main/frontend/Dockerfile
- Command line
-
hf download hf://spaces/vishalharkal/BookMind/frontend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/vishalharkal/BookMind/resolve/main/frontend/Dockerfile
703 Bytes
| # Build stage | |
| FROM node:20-slim AS build | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| RUN npm install | |
| COPY . . | |
| RUN npm run build | |
| # Production stage | |
| FROM nginx:stable-alpine | |
| COPY --from=build /app/dist /usr/share/nginx/html | |
| # Custom nginx config to handle SPA routing if needed | |
| RUN echo 'server { \ | |
| listen 80; \ | |
| location / { \ | |
| root /usr/share/nginx/html; \ | |
| index index.html index.htm; \ | |
| try_files $uri $uri/ /index.html; \ | |
| } \ | |
| location /api { \ | |
| proxy_pass http://backend:8000; \ | |
| proxy_set_header Host $host; \ | |
| proxy_set_header X-Real-IP $remote_addr; \ | |
| } \ | |
| }' > /etc/nginx/conf.d/default.conf | |
| EXPOSE 80 | |
| CMD ["nginx", "-g", "daemon off;"] | |