adds goat counter
Build and Push Docker Image / build (push) Successful in 11s

This commit is contained in:
2026-04-09 16:48:15 -04:00
parent 94f573f9d7
commit 17f94296c1
2 changed files with 30 additions and 0 deletions
Executable
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
BUCKET="$(basename "$(cd "$(dirname "$0")" && pwd)")"
ENDPOINT="https://s3.hantim.net"
LOCAL_DIR="static/media"
usage() {
echo "usage: $0 <pull|push>"
echo " pull download media from garage to $LOCAL_DIR/"
echo " push upload media from $LOCAL_DIR/ to garage"
exit 1
}
[[ $# -eq 1 ]] || usage
case "$1" in
pull)
aws --endpoint-url "$ENDPOINT" s3 sync "s3://$BUCKET/" "$LOCAL_DIR/"
;;
push)
aws --endpoint-url "$ENDPOINT" s3 sync "$LOCAL_DIR/" "s3://$BUCKET/"
;;
*)
usage
;;
esac
+3
View File
@@ -84,3 +84,6 @@
</div>
</body>
</html>
<script data-goatcounter="https://goatcounter.hantim.net/count"
async src="//goatcounter.hantim.net/count.js"></script>