MultiUser Plugin - Relocating the Wiki

48 views
Skip to first unread message

Kevin Kleinfelter

unread,
Apr 6, 2018, 11:09:39 AM4/6/18
to TiddlyWiki
After installing the MultiUser plugin, it puts the wiki files in  node_modules/tiddlywiki/editions.  How would I make it run with the 'live' files elsewhere?

As explanation, I'm trying to run my TW in a Docker container.  It would be convenient to put all my image setup operations in the Dockerfile, and then mount my data directory (enabling data persistence) when I start my container.  But creating the image doesn't have access to the mounted-at-runtime data directory.

At runtime, I'd like node_modules/tiddlywiki/editions to be read-only, with my data reads/write going elsewhere.

So I'd like to install TW and the MultiUser plugin into the node_modules directory, and at runtime I'd check for the existence of ~/tw-data, and if it doesn't exist, copy whatever from node_modules/tiddlywiki to ~/tw-data.  Then launch the TW node server.

Thanks!

Jed Carty

unread,
Apr 6, 2018, 12:42:52 PM4/6/18
to TiddlyWiki
I don't know what you mean by he first two paragraphs. The wiki files used and edited are in whatever folder you give as the command line argument or in the node settings part of the control panel in the wiki, the files in the editions folder shouldn't ever be edited by the wiki.

For the second part, that is what is done by the single executable version, look at tiddlywiki.js here https://github.com/OokTech/TW5-SingleExecutable/blob/master/tiddlywiki.js

You may not need the special copy function, for some reason the norma file copying didn't work from the virtual file system created by the packaging process.

Kevin Kleinfelter

unread,
Apr 6, 2018, 1:36:03 PM4/6/18
to TiddlyWiki
Whoops.  My mistake.  I interpreted your instructions from gihtub:
cp -r TiddlyWiki5/plugins/OokTech/MultiUser/MultiUserWiki TiddlyWiki5/editions/
cd TiddlyWiki5
node ./tiddlywiki.js editions/MultiUserWiki  --wsserver

as meaning it was the mandatory location.

Hey!  The up-side of all my questions is that now you know someone is definitely trying to use your plugin.
Thanks!
Reply all
Reply to author
Forward
0 new messages