Giter Club home page Giter Club logo

tiddlywiki-docker's Introduction

Supported tags and respective Dockerfile links

TiddlyWiki Docker

TiddlyWiki is a self-contained JavaScript wiki that's useful as a non-linear notebook for capturing, organizing, and sharing complex information. These container images are for running TiddlyWiki as a Node.js application, which improves syncing and saving functionality over the single file version.

Build Status

See the TiddlyWiki release notes for details on specific versions. Automated builds of these images are published to elasticdog/tiddlywiki on Docker Hub.

Usage

These Docker images are meant to replicate the functionality of the tiddlywiki CLI executable. As a sanity check, you can expect the following command to display the version number of TiddlyWiki:

docker run -it --rm elasticdog/tiddlywiki --version

That said, there are a few caveats to consider when using a Docker-ized version of this command:

  • Port Publishing
    The Dockerfile exposes port 8080 from the container, but you must bind to 0.0.0.0 rather than the default 127.0.0.1 (localhost) when running the HTTP server interface, or connectivity won't work from the host.

  • Data Persistence
    If you actually want to persist your tiddlers, you'll need to get them out of the container; you can use either volumes or bind mounts. In the container, there is a predefined data volume under /tiddlywiki that is used as the default working directory.

  • Ownership Permissions
    If you do use a bind mount, don't forget that the process running within the container will change the host filesystem. You should run the container with the --user option so that files are created with the desired ownership.

To facilitate handling these things, you can write short wrapper scripts for common scenarios...

NOTE: Advanced versions of these example scripts can be found in the contrib directory of the source repository.

Interactive Wrapper

For the scenario where you want to run commands interactively, you could create something like the following wrapper script:

#!/usr/bin/env bash

docker run --interactive --tty --rm \
	--publish 127.0.0.1:8080:8080 \
	--mount "type=bind,source=${PWD},target=/tiddlywiki" \
	--user "$(id -u):$(id -g)" \
	elasticdog/tiddlywiki \
	"$@"

Interactive Example

Assuming the interactive wrapper script is named tiddlywiki-docker and exists in the current directory, you can initialize and serve a new wiki using the following commands:

  1. Create a folder for a new wiki that includes the server-related components:

    $ ./tiddlywiki-docker mynewwiki --init server
    Copied edition 'server' to mynewwiki
    
  2. Start the TiddlyWiki server:

    $ ./tiddlywiki-docker mynewwiki --listen host=0.0.0.0
    Serving on 0.0.0.0:8080
    (press ctrl-C to exit)
     syncer-server-filesystem: Dispatching 'save' task: $:/StoryList
     filesystem: Saved file /tiddlywiki/mynewwiki/tiddlers/$__StoryList.tid
    
  3. Edit the TiddlyWiki by navigating to http://localhost:8080 in your host's web browser. You should follow the Getting Started instructions to make sure that your changes are being reliably saved.

  4. Stop the TiddlyWiki server by pressing <Ctrl-C> back in the terminal.

See ./tiddlywiki-docker --help for more details.

Background Wrapper

For the scenario where you want to run commands in the background (e.g. to serve an existing wiki), you could create something like the following wrapper script:

#!/usr/bin/env bash

readonly WIKIFOLDER=$1

docker run --detach --rm \
	--name tiddlywiki \
	--publish 127.0.0.1:8080:8080 \
	--mount "type=bind,source=${PWD},target=/tiddlywiki" \
	--user "$(id -u):$(id -g)" \
	elasticdog/tiddlywiki \
	"$WIKIFOLDER" \
	--listen host=0.0.0.0

Background Example

Assuming the background wrapper script is named tiddlywiki-serve and exists in the current directory, you can serve an existing wiki using the following commands:

  1. Start the TiddlyWiki server:

    $ ./tiddlywiki-serve mynewwiki
    9b76d1be260f9e19406cbdec9f5dd4d087ce87d81f345da4eb6d23723e928043
    
  2. You can see that the TiddlyWiki server is still running in the background:

    $ docker ps --latest
    CONTAINER ID        IMAGE                          COMMAND                  CREATED                  STATUS              PORTS                      NAMES
    9b76d1be260f        elasticdog/tiddlywiki:latest   "/sbin/tini -- tiddl…"   Less than a second ago   Up 23 seconds       127.0.0.1:8080->8080/tcp   tiddlywiki
    
  3. Edit the TiddlyWiki by navigating to http://localhost:8080 in your host's web browser.

  4. Stop the TiddlyWiki server:

    docker stop tiddlywiki
    

Contributing

The TiddlyWiki Docker project welcomes contributions from everyone. If you're thinking of helping out, please read the guidelines for contributing.

License

tiddlywiki-docker is provided under the terms of the MIT License.

Copyright © 2018–2021, Aaron Bull Schaefer.

tiddlywiki-docker's People

Contributors

elasticdog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tiddlywiki-docker's Issues

What is the latest supported version here - 5.1.23 right?

Hi and thanks very much for your work here guys ! really appreciate this

I am confused - is 5.1.23 the latest support, or do you have support further on?

In my case I did not specify any tags and I got 5.1.23 - which I also see in readme

I guess people have forked this to use later version, is this the way?

Cheers

Add tag for 5.2.x series

Hello, and thank you for maintaining this very useful repository! TiddlyWiki has now published version 5.2.0, and I am wondering if it would be possible to add tags to support the new version.

Thanks again!

Consider Using Git Tags for Versions

I saw in the readme you provide links to Dockerfiles for older revisions.
Have you considered using git tags for these commits, and then the hyperlinks could be references to the tags.

$ git show-ref --tags --abbrev
3e4df0f refs/tags/5.1
fdac15a refs/tags/5.1.17
2ead91d refs/tags/5.1.18
a29642c refs/tags/5.1.19
5368ab2 refs/tags/5.1.21
3e4df0f refs/tags/5.1.22
e5bd122 refs/tags/5.1.23
5797dec refs/tags/5.2.0
diff --git a/README.md b/README.md
index 95ba442..9abbca0 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
 # Supported tags and respective `Dockerfile` links

 - [`5.2.1`, `5.2`, `5`, `latest` (*5/Dockerfile*)](https://github.com/elasticdog/tiddlywiki-docker/blob/master/5/Dockerfile)
-- [`5.2.0`, (*5/Dockerfile @ 5797dec*)](https://github.com/elasticdog/tiddlywiki-docker/blob/5797dec96dcdae75b60925ca9422eece800223ce/5/Dockerfile)
-- [`5.1.23` `5.1` (*5/Dockerfile* @e5bd122)](https://github.com/elasticdog/tiddlywiki-docker/blob/e5bd1226fbc21b7747ebd7bad22a8c7673ab8b0c/5/Dockerfile)
-- [`5.1.22` (*5/Dockerfile* @ 3e4df0f)](https://github.com/elasticdog/tiddlywiki-docker/blob/3e4df0f8a33db4fac6724ada969705c1622a5af0/5/Dockerfile)
-- [`5.1.21` (*5/Dockerfile* @ 5368ab2)](https://github.com/elasticdog/tiddlywiki-docker/blob/5368ab2480dd98dfdbd611e6344e2d6e3c389369/5/Dockerfile)
-- [`5.1.19` (*5/Dockerfile* @ a29642c)](https://github.com/elasticdog/tiddlywiki-docker/blob/a29642cab96186390b6866e45f56cd74807c39ba/5/Dockerfile)
-- [`5.1.18` (*5/Dockerfile* @ 2ead91d)](https://github.com/elasticdog/tiddlywiki-docker/blob/2ead91df276b99724e795c96cdd59e26c367d8d9/5/Dockerfile)
-- [`5.1.17` (*5/Dockerfile* @ fdac15a)](https://github.com/elasticdog/tiddlywiki-docker/blob/fdac15a3a930365c98e3474492465e77e0148c55/5/Dockerfile)
+- [`5.2.0`](https://github.com/elasticdog/tiddlywiki-docker/blob/5.2.0/5/Dockerfile)
+- [`5.1.23` `5.1`](https://github.com/elasticdog/tiddlywiki-docker/blob/5.1.23/5/Dockerfile)
+- [`5.1.22`](https://github.com/elasticdog/tiddlywiki-docker/blob/5.1.22/5/Dockerfile)
+- [`5.1.21`https://github.com/elasticdog/tiddlywiki-docker/blob/5.1.21/5/Dockerfile)
+- [`5.1.19`](https://github.com/elasticdog/tiddlywiki-docker/blob/5.1.19/5/Dockerfile)
+- [`5.1.18`](https://github.com/elasticdog/tiddlywiki-docker/blob/5.1.18/5/Dockerfile)
+- [`5.1.17`](https://github.com/elasticdog/tiddlywiki-docker/blob/5.1.17/5/Dockerfile)

 ## TiddlyWiki Docker

What do you think?

arm Docker image

I would like to run your tiddlywiki-docker image on my Raspberry PI using Docker. Could you please add arm support for your Docker image?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.