Files
SocialPub/tools/pasture/peers/gancio.sh
T
thepraandClaude Opus 5.5 c65a44ba88 Pasture: Gancio joins
Gancio 1.28.2 on its own sqlite, its config.json written before the first start (without it Gancio waits in its setup
wizard), trusting Caddy's CA through NODE_EXTRA_CA_CERTS; fediverse replies are kept as event resources. Its one
Application actor publishes the agenda, and scenarios/gancio.sh passes its 17 checks with no change to PrivaPub: the
follow, an event with its start, end and place, a reply kept as a resource, the edit and the deletion, the unfollow,
statistics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
2026-10-05 11:18:50 +02:00

47 lines
2.5 KiB
Bash

# Gancio 1.28.2: a shared agenda. One Application actor (`relay`, its instance_name) publishes every confirmed event as
# an Event (a place, or an online location; times in seconds); fediverse replies become an event's "resources" once
# they are enabled. Node, on its own sqlite in the pasture-gancio-data volume, trusting Caddy's CA through
# NODE_EXTRA_CA_CERTS. Its configuration is a config.json in that volume, written before its first start (without it,
# Gancio waits in its setup wizard); its admin is made by its CLI. Its API takes a token from an OAuth password grant
# (/oauth/login, client_id self).
GANCIO_IMAGE=${GANCIO_IMAGE:-docker.io/cisti/gancio:1.28.2}
GANCIO_PASSWORD=Gancio-Pasture-1
gancio_cli() { podman exec -e GANCIO_DATA=/home/node/data -w /home/node/data pasture-gancio gancio "$@"; }
gancio_up() {
podman volume exists pasture-gancio-data || podman volume create --label pasture=1 pasture-gancio-data >/dev/null
podman run --rm -i -v pasture-gancio-data:/data --entrypoint sh "$GANCIO_IMAGE" -c 'cat > /data/config.json && chown -R node /data' <<'JSON'
{
"baseurl": "https://gancio.test",
"hostname": "gancio.test",
"server": { "host": "0.0.0.0", "port": 13120 },
"log_level": "info",
"log_path": "/home/node/data/logs",
"db": { "dialect": "sqlite", "storage": "/home/node/data/gancio.sqlite", "logging": false },
"user_locale": "/home/node/data/user_locale",
"upload_path": "/home/node/data/uploads"
}
JSON
podman run -d --replace --name pasture-gancio --network $net --label pasture=1 -e GANCIO_DATA=/home/node/data -w /home/node/data \
-e NODE_EXTRA_CA_CERTS=/ca/root.crt -v "$ca/root.crt:/ca/root.crt:z,ro" -v pasture-gancio-data:/home/node/data "$GANCIO_IMAGE" >/dev/null
for _ in $(seq 1 90); do
site gancio.test -s -o /dev/null -w '%{http_code}' https://gancio.test:6443/.well-known/nodeinfo 2>/dev/null | grep -q 200 && break
sleep 2
done
gancio_settle
echo "gancio: https://gancio.test:6443"
}
# its admin, fediverse replies taken as resources, and a restart so the settings hold
gancio_settle() {
gancio_cli users create gcadmin@gancio.test "$GANCIO_PASSWORD" admin >/dev/null 2>&1 || true
gancio_cli settings set enable_resources true >/dev/null 2>&1 || true
podman restart pasture-gancio >/dev/null
for _ in $(seq 1 60); do
site gancio.test -s -o /dev/null -w '%{http_code}' https://gancio.test:6443/.well-known/nodeinfo 2>/dev/null | grep -q 200 && break
sleep 2
done
echo "gcadmin@gancio.test:$GANCIO_PASSWORD" > "$here/.state/gancio.token"
}