Spaces:
Paused
Paused
Download Dockerfile from void0028/backend-engine-v1: direct link, hf CLI and curl.
- Browser
- Download file 2.43 kB
-
https://huggingface.co/spaces/void0028/backend-engine-v1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/void0028/backend-engine-v1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/void0028/backend-engine-v1/resolve/main/Dockerfile
2.43 kB
| FROM node:18-bullseye-slim | |
| USER root | |
| RUN apt-get update | |
| apt-get install -y wget ffmpeg dumb-init procps | |
| apt-get autoremove -y | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /stremio | |
| RUN mkdir -p /root/.stremio-server | |
| RUN mkdir -p /stremio/data | |
| RUN wget https://dl.strem.io/four/v4.4.168/server.js -O server.js | |
| RUN wget https://dl.strem.io/four/v4.4.168/stremio.asar -O stremio.asar | |
| RUN npm install http-proxy | |
| ENV NO_CORS=1 | |
| ENV CASTING_DISABLED=1 | |
| ENV STREAMING_DISABLED=0 | |
| ENV PORT=11470 | |
| RUN echo "const http = require('http'); \ | |
| const httpProxy = require('http-proxy'); \ | |
| const proxy = httpProxy.createProxyServer({}); \ | |
| const STREMIO_TARGET = 'http://127.0.0.1:11470'; \ | |
| \ | |
| proxy.on('error', function (err, req, res) { \ | |
| res.writeHead(500); res.end('Booting...'); \ | |
| }); \ | |
| \ | |
| const server = http.createServer((req, res) => { \ | |
| if (req.url === '/') { \ | |
| res.writeHead(200, {'Content-Type': 'text/html'}); \ | |
| res.end('<h1 style=\"color:blue;text-align:center;font-family:monospace;margin-top:20%\">💾 REAL DISK MODE <br> ⚡ 25GB CACHE | 500 CONNS</h1>'); \ | |
| } else { \ | |
| proxy.web(req, res, { target: STREMIO_TARGET }); \ | |
| } \ | |
| }); \ | |
| server.listen(7860, '0.0.0.0');" > /stremio/proxy.js | |
| RUN echo "#!/bin/bash \n\ | |
| \n\ | |
| CACHE_ROOT=\"/stremio/data\" \n\ | |
| echo \"💾 FORCING STORAGE TO: \$CACHE_ROOT (OverlayFS)\" \n\ | |
| \n\ | |
| \n\ | |
| echo \"{\\\"cacheSize\\\": 26843545600, \\\"cacheRoot\\\": \\\"\$CACHE_ROOT\\\", \\\"btProfile\\\": \\\"ultra_fast\\\", \\\"btMaxConnections\\\": 500, \\\"connections\\\": 500, \\\"btHandshakeTimeout\\\": 20000, \\\"btRequestTimeout\\\": 4000, \\\"btDownloadSpeedSoftLimit\\\": 1677721600, \\\"btDownloadSpeedLimit\\\": 0, \\\"uploadSpeedLimit\\\": 1048576, \\\"btMinPeersForStable\\\": 100}\" > /root/.stremio-server/server-settings.json \n\ | |
| \n\ | |
| node /stremio/proxy.js | |
| node /stremio/server.js" > /stremio/start.sh && chmod +x /stremio/start.sh | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/usr/bin/dumb-init", "--"] | |
| CMD ["/stremio/start.sh"] | |