Spaces:
Paused
Paused
Download Dockerfile from qwen2api/token-consumer: direct link, hf CLI and curl.
- Browser
- Download file 616 Bytes
-
https://huggingface.co/spaces/qwen2api/token-consumer/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/qwen2api/token-consumer/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/qwen2api/token-consumer/resolve/main/Dockerfile
616 Bytes
| FROM node:20-alpine | |
| WORKDIR /app | |
| # Copy package files | |
| COPY package*.json ./ | |
| # Install production dependencies only | |
| RUN npm ci --only=production | |
| # Copy application files | |
| COPY server.js . | |
| COPY executor.js . | |
| COPY storage.js . | |
| COPY logger.js . | |
| COPY token-consumer.html . | |
| # Create data directory | |
| RUN mkdir -p /app/data | |
| # Expose port | |
| EXPOSE 7860 | |
| # Set environment | |
| ENV NODE_ENV=production | |
| ENV PORT=7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD wget --no-verbose --tries=1 --spider http://localhost:7860/health || exit 1 | |
| # Start server | |
| CMD ["node", "server.js"] | |