berth init

This commit is contained in:
2026-09-14 03:57:00 -03:00
parent 2d9bc9289c
commit a9df70cde0
25 changed files with 2506 additions and 0 deletions

33
berth/ctrl/registry.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# The image registry — remote, and reachable only over the overlay.
#
# Usage:
# ./registry.sh status
#
# One verb: berth reports on a registry running on someone else's box. Starting
# and stopping it is that box's business.
set -euo pipefail
cd "$(dirname "$0")"
source ./lib/config.sh
source ./lib/estate.sh
load_config
status() {
local wg_server; wg_server=$(overlay_get estate "peers.box.address")
echo "registry: registry.${DOMAIN} (public pull via /v2/)"
echo "push: ${wg_server}:5000 (WireGuard-only, not in the firewall)"
echo
echo "would run:"
echo " curl -s https://registry.${DOMAIN}/v2/_catalog"
echo
echo "NOTE: the push endpoint binds ${wg_server}, and $(estate_get 'vpn._status')."
echo " A freshly-provisioned box cannot start the gateway compose file"
echo " at all, because that bind fails."
}
case "${1:-status}" in
status) status ;;
*) echo "usage: $0 [status]" >&2; exit 1 ;;
esac