mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-26 08:40:56 -07:00
- Add Dockerfile (Node Alpine, unprivileged user, configurable via env vars) - Add docker-compose.yml with named volume and environment variable support - Add docker/entrypoint.sh for wiki init and --listen argument assembly - Add bin/docker-publish.sh for manual multi-platform image publishing - Add .github/workflows/docker-publish.yml for automated Docker Hub release on GitHub Release publish - Add editions/tw5.com howto tiddler documenting Docker usage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
services:
|
|
tiddlywiki:
|
|
build:
|
|
context: .
|
|
args:
|
|
NODE_LTS_VERSION: "22"
|
|
# Or use the published image:
|
|
# image: tiddlywiki/tiddlywiki:latest
|
|
init: true # Docker's built-in init process for proper signal handling
|
|
ports:
|
|
- "127.0.0.1:8080:8080"
|
|
volumes:
|
|
# Named volume (default, Docker manages storage):
|
|
- tiddlywiki-data:/data
|
|
# Bind mount (map a host directory):
|
|
# - ./my-wiki:/data
|
|
# If using bind mount, the container runs as UID/GID 1000 by default.
|
|
# On most Linux systems this matches the first non-root user, so no extra
|
|
# chown is needed. If your host user has a different UID, either:
|
|
# mkdir -p ./my-wiki && chown 1000:1000 ./my-wiki
|
|
# or override at runtime:
|
|
# user: "$(id -u):$(id -g)"
|
|
environment:
|
|
TIDDLYWIKI_PORT: "8080"
|
|
TIDDLYWIKI_HOST: "0.0.0.0"
|
|
# Authentication — set these (or use a .env file)
|
|
TIDDLYWIKI_USERNAME: ""
|
|
TIDDLYWIKI_PASSWORD: ""
|
|
# Access control:
|
|
# (anon) — all users including anonymous
|
|
# (authenticated) — any logged-in user
|
|
# (admin) — admin users only
|
|
TIDDLYWIKI_READERS: "(anon)"
|
|
TIDDLYWIKI_WRITERS: "(authenticated)"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
tiddlywiki-data:
|