1.9 KiB
Executable File
1.9 KiB
Executable File
Pull docker image:
docker pull elasticdog/tiddlywiki
Create persistent directory:
/app/appsdocker/tiddlywiki
cd /app/appsdocker/tiddlywiki
Check the version of the application:
docker run -it --rm elasticdog/tiddlywiki --version
Create tiddlywiki-docker shell as:
#!/usr/bin/env bash
docker run --interactive --tty --rm \
--publish 192.168.0.103:8080:8080 \
--mount "type=bind,source=${PWD},target=/tiddlywiki" \
--user "$(id -u):$(id -g)" \
elasticdog/tiddlywiki \
"$@"
Use the sccript to create a new wiki:
./tiddlywiki-docker mywiki --init server
Create tiddlywiki-server shell as:
#!/usr/bin/env bash
readonly WIKIFOLDER=$1
docker run --detach --rm \
--name tiddlywiki \
--publish 192.168.0.103:7006:8080 \
--mount "type=bind,source=${PWD},target=/tiddlywiki" \
--user "$(id -u):$(id -g)" \
elasticdog/tiddlywiki \
"$WIKIFOLDER" \
--listen host=0.0.0.0
where 192.168.0.103 is the listening host interface and 7006 is the listening TCP port.
Run the tiddlywiki server:
./tiddlywiki-server mywiki
Test the application:
http://192.168.0.103:7006/
Optionally create a docker-compose.yaml file in order to start the container with docker composer and customize the command line startup options. In this case, create a private wiki requiering authentification:
services:
tiddlywiki:
image: "elasticdog/tiddlywiki"
container_name: "tiddlywiki"
volumes:
- /app/persistent_docker/tiddlywiki/mywiki:/tiddlywiki
ports:
- "7006:8080"
restart: always
command: "/tiddlywiki --listen host=0.0.0.0 username=***** password=*****"
Start the container:
docker-compose up -d
It is very eassy to clone a tiddlywiki: just copy the content of tiddlywiki root folder fdrom a wiki to another.
Installed plugins will be also copied because they are a simply tiddlers.