Files
kokkoja-rel/deploy/deploy.sh
T
ackandClaude Fable 5.1 89b4a41b2a Character codes in typed text; the site and relay at app.kokkoja.com
With the Text tool, Klammertext's codes give letters a keyboard lacks:
^o" is ö, ^s^ ß, ^a1 ā, ^130ED^ a code point of 4 to 6 digits,
^9053 53EF^ a sequence, ^^ a caret, replaced as each code is completed.
The public site and relay moved to app.kokkoja.com; the old name
redirects.  The Markdown documentation is withdrawn from the release
while it is converted to Klammertext; the README's links to it are
stale until then.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13 20:40:09 +02:00

29 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Deploy the Kokkoja server: copy the relay, the client and the server
# files to the VPS, then run deploy/setup_vps.sh there. Run from the
# project directory on a development machine.
#
# deploy/deploy.sh
#
# KOKKOJA_SERVER names the ssh destination (default root@vps313847.iceservers.net).
# The site's config.json is written here: the relay and site addresses
# below are the server's public names.
set -euo pipefail
cd "$(dirname "$0")/.."
server=${KOKKOJA_SERVER:-root@vps313847.iceservers.net}
site=https://app.kokkoja.com/
relay=wss://app.kokkoja.com/relay
staging=$(mktemp -d)
trap 'rm -rf "$staging"' EXIT
mkdir -p "$staging/relay" "$staging/client" "$staging/deploy"
cp relay/kokkoja_relay.py relay/requirements.txt "$staging/relay/"
rsync -a --exclude '__pycache__' client/ "$staging/client/"
printf '{"relay": "%s", "storage": "browser", "site": "%s"}\n' "$relay" "$site" > "$staging/client/config.json"
cp deploy/kokkoja-relay.service deploy/nginx-site.conf deploy/setup_vps.sh "$staging/deploy/"
ssh "$server" 'mkdir -p /opt/kokkoja/incoming'
rsync -a --delete "$staging/" "$server:/opt/kokkoja/incoming/"
ssh "$server" 'bash /opt/kokkoja/incoming/deploy/setup_vps.sh'