#!/usr/bin/env bash set -eu cd "$(dirname "$0")/.." # Upload homepage cd static scp homepage.html root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/index.html # Build notes cd ../scripts WATCH_AND_REBUILD=0 python3 generate.py ~/.logs/brain ../_gen/notes # Upload notes cd ../_gen rsync -HPaz static/ --delete-after --exclude='*.html' root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/static/ rsync -HPaz notes/ --delete-after --exclude='xapian' --exclude='*.sqlite3' root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar/notes/ rsync -HPaz notes/db.sqlite3 root@codigoparallevar.com:/mnt/vols/misc/codigoparallevar-api/ # Restart API server ssh root@codigoparallevar.com docker restart notes-api-server