Download Dockerfile from xunwei/fitAI: direct link, hf CLI and curl.
- Browser
- Download file 804 Bytes
-
https://huggingface.co/spaces/xunwei/fitAI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/xunwei/fitAI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/xunwei/fitAI/resolve/main/Dockerfile
804 Bytes
| # ββ Stage 1: Build frontend ββ | |
| FROM node:24-alpine AS frontend-build | |
| WORKDIR /app | |
| COPY frontend/package*.json ./ | |
| RUN npm install | |
| COPY frontend/ . | |
| RUN npm run build | |
| # ββ Stage 2: Production ββ | |
| FROM python:3.14-slim | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends nginx && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Backend dependencies | |
| WORKDIR /app | |
| COPY backend/requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Backend source | |
| COPY backend/ . | |
| # Frontend static files | |
| COPY --from=frontend-build /app/dist /usr/share/nginx/html | |
| # Nginx config | |
| COPY nginx.hf.conf /etc/nginx/conf.d/default.conf | |
| RUN rm -f /etc/nginx/sites-enabled/default | |
| # Startup script | |
| COPY start.sh /app/start.sh | |
| RUN chmod +x /app/start.sh | |
| EXPOSE 8080 | |
| CMD ["/app/start.sh"] | |