kiwix / kiwix-js-pwa

Kiwix JS Offline Browser implemented as a Progressive Web App (PWA), and packaged as Electron, NWJS and UWP apps for Windows and Linux.
https://pwa.kiwix.org
GNU General Public License v3.0
168 stars 26 forks source link

Docker Support #623

Closed epheterson closed 3 weeks ago

epheterson commented 3 weeks ago

Please consider making an official Docker image. This would allow for much easier setup and updating.

Thanks for this great software!

Jaifroid commented 3 weeks ago

@epheterson Assuming you are talking about the PWA, we already serve it from a Docker container on the GitHub Container Registry here: https://github.com/kiwix/kiwix-js-pwa/pkgs/container/kiwix-pwa/ . To be clear, this is an Ngnx-based server that serves the files necessary to run the PWA. You can run it locally with docker pull ghcr.io/kiwix/kiwix-pwa:latest.

However, packaging the code in a Docker container is only for (our) convenience, it's not necessary if you just want to serve or run the code locally. The code works as-is when served from a cloned fork using Electron or the built-in Vite server

Here are the steps to run or serve the PWA locally. Make sure you have Git / Node / NPM installed in your computer.

  1. Clone the Repo
  2. In the Repo root, run npm install
  3. To start the Electron app locally, run npm start. This works as is. But it also includes a local server if you want to run the PWA in another browser: you can find the URL / localhost:port in Configuration (default http://localhost:3000).
  4. If you prefer to serve the code to a local browser without Electron, you can run npm run serve. However, take a look at CONTRIBUTING for some gotchas with serving the code locally.
epheterson commented 3 weeks ago

Thanks, I’ll give it a shot!