diff --git a/Dockerfile b/Dockerfile index 34467d5..36179cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,12 @@ FROM node:alpine -RUN npm install -g tiddlywiki +RUN npm install -g tiddlywiki@5.1.22 # Setup wiki volume VOLUME /var/lib/tiddlywiki WORKDIR /var/lib/tiddlywiki # Add init-and-run script -ADD tiddlyweb_host /tiddlyweb_host_template ADD init-and-run-wiki /usr/local/bin/init-and-run-wiki # Meta diff --git a/README.md b/README.md index 5af3b01..2c6e40d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,14 @@ Forked from The Docker image is available at [m0wer/tiddlywiki - Docker Hub](https://hub.docker.com/r/m0wer/tiddlywiki). +## Available Docker Images at DockerHub + +Image Name | Tag | TiddyWiki Version +-----------------|------------|------------------ +m0wer/tiddlywiki | latest | 5.1.22 +m0wer/tiddlywiki | v[X] | [X] +m0wer/tiddlywiki | test | ? + ## Prerequisites * Docker. @@ -24,7 +32,7 @@ Now TiddlyWiki should be running on ## Keeping the data The container uses a Docker volume to save the wiki data. In order not -to lose sight of that, I recommend using a local folder for the volume. +to lose sight of that, I recommend using a local directory for the volume. ```bash docker run -d -p 8080:8080 -v $(pwd)/.tiddlywiki:/var/lib/tiddlywiki m0wer/tiddlywiki @@ -32,20 +40,21 @@ docker run -d -p 8080:8080 -v $(pwd)/.tiddlywiki:/var/lib/tiddlywiki m0wer/tiddl In this example, the folder `$(pwd)/.tiddlywiki` is used for the data. -## Auth +## Authentication -Default auth is `user`:`wiki`. +Default credentials are `user`:`wiki`. -Simply provide the USERNAME and PASSWORD env variables to customise. +Simply provide the `USERNAME` and `PASSWORD` environment variables to +customize. ## Other settings +### Limit Node.js memory + If you are in a memory-constrained environment, you can provide the `NODE_MEM` environment variable to specify the memory ceiling (in MB) -To serve the tiddlywiki at a -[non-root prefix path](https://tiddlywiki.com/static/Using%2520a%2520custom%2520path%2520prefix%2520with%2520the%2520client-server%2520edition.html) -set the `SERVE_URI` environment variable: this variable ''must'' start with a -forward slash character. The tiddlywiki will be served by the container at -`http:///${SERVE_URI}` - the container initialization script takes care of -setting the required host configuration tiddler. +### Debug + +Set the `DEBUG_LEVEL` environment variable to `debug`. For example by passing +`-e DEBUG_LEVEL=debug` option in `docker run`. diff --git a/init-and-run-wiki b/init-and-run-wiki index 0fac3f0..8ab47c2 100755 --- a/init-and-run-wiki +++ b/init-and-run-wiki @@ -19,5 +19,6 @@ fi # Start the tiddlywiki server -exec /usr/bin/env node $NODEJS_V8_ARGS $tiddlywiki_script mywiki --server 8080 $:/core/save/all text/plain text/html "${USERNAME:-user}" "${PASSWORD-wiki}" 0.0.0.0 ${SERVE_URI} - +exec /usr/bin/env node $NODEJS_V8_ARGS $tiddlywiki_script mywiki --listen +host=0.0.0.0 port=8080 username="${USERNAME:-user}" password="${PASSWORD-wiki}" +path-prefix=${SERVE_URI-/} debug-level=${DEBUG_LEVEL-none}