Spaces:
Sleeping
Sleeping
Download Dockerfile.simple from edichat/edi.chat.test: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/spaces/edichat/edi.chat.test/resolve/main/Dockerfile.simple
- Command line
-
hf download hf://spaces/edichat/edi.chat.test/Dockerfile.simple
-
curl -L -o Dockerfile.simple https://huggingface.co/spaces/edichat/edi.chat.test/resolve/main/Dockerfile.simple
1.11 kB
| # Simple production Dockerfile for Hugging Face Spaces | |
| FROM node:20-alpine | |
| # Install basic dependencies (including git for HF Spaces) | |
| RUN apk add --no-cache curl wget git dumb-init | |
| # Create app directory | |
| WORKDIR /app | |
| # Copy package files | |
| COPY package*.json ./ | |
| COPY backend/package*.json ./backend/ | |
| COPY frontend/package*.json ./frontend/ | |
| # Install backend dependencies | |
| WORKDIR /app/backend | |
| RUN npm ci --only=production --silent | |
| # Install frontend dependencies and build | |
| WORKDIR /app/frontend | |
| RUN npm ci --silent | |
| COPY frontend/ ./ | |
| RUN DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false TSC_COMPILE_ON_ERROR=true npm run build | |
| # Setup production files | |
| WORKDIR /app | |
| COPY backend/ ./backend/ | |
| COPY --from=0 /app/frontend/build ./backend/public/ | |
| # Set environment | |
| ENV NODE_ENV=production \ | |
| PORT=7860 \ | |
| USE_LOCAL_AI=true \ | |
| USE_HUGGINGFACE=false \ | |
| USE_OPENAI=false | |
| # Expose port | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| # Start application | |
| CMD ["node", "backend/server.js"] |