Spaces:
Sleeping
Sleeping
Download Dockerfile from riad-hf/rr-locker-api: direct link, hf CLI and curl.
- Browser
- Download file 774 Bytes
-
https://huggingface.co/spaces/riad-hf/rr-locker-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/riad-hf/rr-locker-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/riad-hf/rr-locker-api/resolve/main/Dockerfile
774 Bytes
| FROM node:20-slim | |
| WORKDIR /app | |
| # Install production dependencies first (better layer caching) | |
| COPY package*.json ./ | |
| RUN npm ci --omit=dev | |
| # Copy application code (includes pre-built dashboard in ./static and ./apk) | |
| COPY . . | |
| # Hugging Face Spaces run as a non-root user (UID 1000). The node:20 image already | |
| # ships a "node" user at UID 1000, so reuse it instead of creating a duplicate. | |
| RUN mkdir -p /data && \ | |
| chown -R node:node /app /data | |
| USER node | |
| ENV NODE_ENV=production \ | |
| PORT=7860 \ | |
| TZ=UTC | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ | |
| CMD node -e "fetch('http://localhost:7860/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" | |
| CMD ["node", "src/server.js"] | |