Clean up: remove build-for-nas.sh, update deploy docs and push script
Build and Push Image / build (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dawnsorrow
2026-02-17 21:02:02 -06:00
parent 0f208b10f2
commit 0a57be59f4
5 changed files with 47 additions and 48 deletions
+16 -15
View File
@@ -1,31 +1,32 @@
#!/usr/bin/env bash
# Manual push of stoat-role-bot image to your Gitea container registry.
# Build and push stoat-role-bot image to your Gitea container registry.
# Image names must be lowercase; owner is lowercased automatically.
#
# One-time: allow HTTP registry (if your Gitea is http://):
# mkdir -p ~/.config/containers
# echo -e '[[registry]]\nlocation = "brassnet.ddns.net:33983"\ninsecure = true' >> ~/.config/containers/registries.conf
# One-time: log in to the registry:
# podman login brassnet.ddns.net:33983
#
# Usage:
# export GITEA_REGISTRY=mygitea.example.com
# export GITEA_OWNER=myuser
# ./push-to-gitea.sh
# Or: ./push-to-gitea.sh mygitea.example.com myuser
# # or: ./push-to-gitea.sh brassnet.ddns.net:33983 Dawnsorrow
set -e
cd "$(dirname "$0")"
GITEA_REGISTRY="${1:-$GITEA_REGISTRY}"
GITEA_OWNER="${2:-$GITEA_OWNER}"
GITEA_REGISTRY="${1:-brassnet.ddns.net:33983}"
GITEA_OWNER="${2:-Dawnsorrow}"
# OCI image names must be lowercase
OWNER_LOWER="$(echo "$GITEA_OWNER" | tr '[:upper:]' '[:lower:]')"
IMAGE_NAME="stoat-role-bot"
TAG="${3:-latest}"
if [ -z "$GITEA_REGISTRY" ] || [ -z "$GITEA_OWNER" ]; then
echo "Usage: GITEA_REGISTRY=host GITEA_OWNER=username $0"
echo " or: $0 <gitea-host> <owner-username> [tag]"
echo "Example: $0 gitea.example.com john"
exit 1
fi
FULL_IMAGE="${GITEA_REGISTRY}/${GITEA_OWNER}/${IMAGE_NAME}:${TAG}"
FULL_IMAGE="${GITEA_REGISTRY}/${OWNER_LOWER}/${IMAGE_NAME}:${TAG}"
echo "Building and pushing to ${FULL_IMAGE} ..."
podman build -t "${FULL_IMAGE}" .
podman push "${FULL_IMAGE}"
echo "Pushed. On your NAS run: docker pull ${FULL_IMAGE}"
echo "Pushed. On your NAS: docker pull ${FULL_IMAGE}"
echo "Then create/update the container to use image: ${FULL_IMAGE}"