Download Dockerfile from binhugg3/admin: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/binhugg3/admin/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/binhugg3/admin/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/binhugg3/admin/resolve/main/Dockerfile
1.01 kB
| FROM node:20-slim AS builder | |
| ENV PNPM_HOME="/pnpm" | |
| ENV PATH="$PNPM_HOME:$PATH" | |
| ENV NODE_OPTIONS=--max-old-space-size=8192 | |
| ENV TZ=Asia/Shanghai | |
| RUN corepack enable | |
| WORKDIR /app | |
| # Copy all source files | |
| COPY . /app | |
| # Install dependencies and build only web-naive | |
| RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | |
| RUN pnpm run build --filter=@vben/web-naive | |
| RUN echo "Build success" | |
| # ββ Production image ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| FROM nginx:stable-alpine AS production | |
| # Support .mjs files | |
| RUN echo 'types { application/javascript js mjs; }' > /etc/nginx/conf.d/mjs.conf | |
| # Copy built files | |
| COPY --from=builder /app/apps/web-naive/dist /usr/share/nginx/html | |
| # Copy nginx config | |
| COPY scripts/deploy/nginx.conf /etc/nginx/nginx.conf | |
| # HuggingFace Spaces exposes port 7860 | |
| EXPOSE 7860 | |
| CMD ["nginx", "-g", "daemon off;"] | |