Download Dockerfile from nexusbert/crucique: direct link, hf CLI and curl.
- Browser
- Download file 1.69 kB
-
https://huggingface.co/spaces/nexusbert/crucique/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/nexusbert/crucique/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/nexusbert/crucique/resolve/main/Dockerfile
1.69 kB
| # Build stage | |
| FROM node:20-slim AS builder | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files | |
| COPY cruciqe-id-card-backend/package*.json ./ | |
| # Install all dependencies (including dev dependencies for building) | |
| RUN npm ci | |
| # Copy TypeScript config | |
| COPY cruciqe-id-card-backend/tsconfig.json ./ | |
| COPY cruciqe-id-card-backend/scripts ./scripts | |
| # Copy source files | |
| COPY cruciqe-id-card-backend/src ./src | |
| # Build TypeScript | |
| RUN npm run build | |
| # Production stage | |
| FROM node:20-slim | |
| # Install system dependencies for Puppeteer | |
| RUN apt-get update && apt-get install -y \ | |
| chromium \ | |
| chromium-sandbox \ | |
| fonts-liberation \ | |
| libappindicator3-1 \ | |
| libasound2 \ | |
| libatk-bridge2.0-0 \ | |
| libatk1.0-0 \ | |
| libcups2 \ | |
| libdbus-1-3 \ | |
| libdrm2 \ | |
| libgbm1 \ | |
| libgtk-3-0 \ | |
| libnspr4 \ | |
| libnss3 \ | |
| libx11-xcb1 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxfixes3 \ | |
| libxrandr2 \ | |
| xdg-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy package files | |
| COPY cruciqe-id-card-backend/package*.json ./ | |
| # Install only production dependencies | |
| RUN npm ci --only=production && npm cache clean --force | |
| # Copy built files from builder stage | |
| COPY --from=builder /app/dist ./dist | |
| # Expose port 7860 (required for Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Set environment variables for Puppeteer | |
| ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | |
| ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium | |
| # Set port to 7860 (required for HF Spaces) | |
| ENV PORT=7860 | |
| ENV NODE_ENV=production | |
| ENV STORAGE_DIR=/app/storage | |
| RUN mkdir -p /app/storage/students /app/storage/cards | |
| VOLUME ["/app/storage"] | |
| # Run the application | |
| CMD ["node", "dist/index.js"] | |