The Stremio Web repository includes a multi-stageDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/stremio/stremio-web/llms.txt
Use this file to discover all available pages before exploring further.
Dockerfile that builds the app and packages it with a lightweight Express server. The final image serves the app on port 8080.
How the build works
TheDockerfile uses three stages:
| Stage | Base | Purpose |
|---|---|---|
base | node:20-alpine | Shared foundation — enables pnpm via corepack, installs git |
app | base | Installs dependencies and runs the webpack production build |
server | base | Installs Express 4 in isolation |
| (final) | base | Combines the build/ output and node_modules from prior stages, exposes port 8080 |
app stage copies only package.json and pnpm-lock.yaml first, so dependency installation is cached separately from source changes.
Building the image
Run from the repository root (where theDockerfile lives):
NODE_VERSION build argument:
20-alpine, matching the Node version in .nvmrc.
Running the container
http://localhost:8080.
HTTP caching
The bundledhttp_server.js sets Cache-Control headers automatically:
| Resource | max-age | Seconds |
|---|---|---|
index.html | ~2 hours | 7200 |
| All other assets | ~1 month | 2629744 |
index.html are fingerprinted with the commit hash (e.g. /<hash>/scripts/main.js), so they are safe to cache aggressively. The short TTL on index.html ensures clients pick up new deployments quickly.
Environment variables
The following variables can be injected at build time via webpack’sEnvironmentPlugin. Pass them as --env KEY=VALUE flags to the webpack CLI, or set them in the shell before calling docker build.
| Variable | Default | Description |
|---|---|---|
SENTRY_DSN | null | Sentry DSN for error reporting. Leave unset to disable. |
SERVICE_WORKER_DISABLED | false | Set to true to skip service-worker registration. |
DEBUG | false in production | Enables debug output. Automatically true in development mode. |
VERSION | value from package.json | App version string embedded in the build. |
COMMIT_HASH | output of git rev-parse HEAD | Injected automatically; used as asset path prefix. |
These variables are baked into the static bundle at build time. They are not read at container runtime and cannot be changed by setting environment variables on the running container.
