mirror of
https://github.com/m0wer/tiddlywiki-docker.git
synced 2026-07-17 16:36:16 +00:00
Merge branch 'master' into patch-3
This commit is contained in:
commit
1c741f590e
2 changed files with 46 additions and 1 deletions
39
README.md
39
README.md
|
|
@ -65,3 +65,42 @@ serving TiddlyWiki. For example by passing `-e PATH_PREFIX=\wiki` option in
|
|||
configure the client as well.
|
||||
|
||||
[path-prefix-note]: https://tiddlywiki.com/static/Using%2520a%2520custom%2520path%2520prefix%2520with%2520the%2520client-server%2520edition.html
|
||||
|
||||
## Docker Compose
|
||||
|
||||
To keep all the docker settings, environment variables and volume data in a folder you can use `docker compose`.
|
||||
|
||||
Create a folder for the project:
|
||||
|
||||
```
|
||||
mkdir my-tiddlywiki-docker
|
||||
cd my-tiddlywiki-docker
|
||||
```
|
||||
|
||||
Create a folder for the data:
|
||||
|
||||
```
|
||||
mkdir tiddlywiki
|
||||
```
|
||||
|
||||
Create `docker-compose.yml` with the following contents:
|
||||
|
||||
```
|
||||
version: '3'
|
||||
services:
|
||||
tiddlywiki:
|
||||
image: m0wer/tiddlywiki
|
||||
volumes:
|
||||
- ./tiddlywiki:/var/lib/tiddlywiki
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080:8080
|
||||
#environment:
|
||||
# - DEBUG_LEVEL=debug
|
||||
# - PATH_PREFIX=\wiki
|
||||
# - NODE_MEM=128
|
||||
# - USERNAME=test
|
||||
# - PASSWORD=test
|
||||
```
|
||||
|
||||
Then run `docker compose up -d`.
|
||||
|
|
|
|||
8
init-and-run-wiki
Executable file → Normal file
8
init-and-run-wiki
Executable file → Normal file
|
|
@ -16,6 +16,11 @@ if [ ! -d /var/lib/tiddlywiki/mywiki ]; then
|
|||
mkdir /var/lib/tiddlywiki/mywiki/tiddlers
|
||||
fi
|
||||
|
||||
# Define plugins, see https://tiddlywiki.com/static/Using%2520TiddlyWiki%2520on%2520Node.js.html
|
||||
if [ -n "$PLUGINS" ]; then
|
||||
plugins_params="$PLUGINS"
|
||||
fi
|
||||
|
||||
# Configure listen command, see https://tiddlywiki.com/static/ListenCommand.html
|
||||
listen_params="host=0.0.0.0 port=8080"
|
||||
listen_params="$listen_params debug-level=${DEBUG_LEVEL-none}"
|
||||
|
|
@ -28,4 +33,5 @@ if [ -n "$USERNAME" ]; then
|
|||
fi
|
||||
|
||||
# Start the tiddlywiki server
|
||||
exec /usr/bin/env node $NODEJS_V8_ARGS $tiddlywiki_script mywiki --listen $listen_params $EXTRAOPTIONS
|
||||
|
||||
exec /usr/bin/env node $NODEJS_V8_ARGS $tiddlywiki_script $plugins_params mywiki --listen $listen_params $EXTRAOPTIONS
|
||||
Loading…
Add table
Add a link
Reference in a new issue