Another way of distributing Federated Wiki. This time with Flatpak.
- flatpak-builder
- A local Node.JS instance is used to generate a
package-lock.jsonfrom the distributed Wiki tarball found on NPM - You will need to clone and install flatpak-node-generator to a local Python environment shared with this repository to generate
generated-sources.json
This example environment uses pyenv and a .tool-versions file to specify an environment for a repository.
Run these commands once:
pyenv install 3.12.4
pyenv virtualenv 3.12.4 org.wiki.fed-3.12.4Run this command once per repository, theirs and ours:
pyenv local org.wiki.fed-3.12.4We need to prepopulate the NPM cache with distribution artifacts from all dependencies named in package.json, plus collect metadata for the flatpak-builder in generated-sources.json.
bin/prepare.shExemplary files come with this repository for convenience.
Build the application into build-dir with using the org.wiki.fed.yaml manifest.
Choose to --install to the current --user and --force-clean the build area.
flatpak-builder --user --install --force-clean build-dir org.wiki.fed.yamlTo get started quickly, you can prepare a simple configuration for your wiki.
mkdir -p $HOME/.wiki
cat <<<"{
\"security_type\": \"friends\",
\"cookieSecret\": \"$(pwgen -n 64 1 | sed -z "s/\n//g")\",
\"session_duration\": 365
}
" > $HOME/.wiki/config.jsonJust run it!
flatpak run org.wiki.fedYour local wiki is now available at http://localhost:3000
Clean all generated files with:
bin/clean.sh- Jon Richter
MIT license. See provided LICENSE.txt file for details.
© 2024 Ecobytes e.V., Jon Richter