[chore] Updated to --listen command.

--server is deprecated.
This commit is contained in:
m0wer 2020-09-11 11:32:00 +02:00
parent 7e16d405de
commit 8d735f0e9d
No known key found for this signature in database
GPG key ID: 30B4ECB4ECEEF686
3 changed files with 23 additions and 14 deletions

View file

@ -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

View file

@ -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://<IP>/${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`.

View file

@ -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}