Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.91 KB

File metadata and controls

58 lines (42 loc) · 1.91 KB

Scripts

docker-build-push.sh

Builds a multi-platform Docker image and pushes it to the GitHub Container Registry as ghcr.io/rsscloud/websub-debug.

Features

  • 🐳 Docker validation — checks Docker is running and you're authenticated to ghcr.io
  • 🏷️ Smart tagging — tags with the version from package.json, the short git SHA, and latest
  • 🎯 Custom tags — pass an extra tag as a positional argument
  • 🚀 Multi-platform — builds linux/amd64 and linux/arm64 via docker buildx
  • 🔍 Dry run — preview the tags without building/pushing

Usage

# Full build and push
npm run docker:build-push

# Dry run — show what would happen without building/pushing
npm run docker:dry-run

# Direct script usage (e.g. with a custom tag)
./scripts/docker-build-push.sh beta
./scripts/docker-build-push.sh --help

Requirements

  • Docker installed and running, with buildx
  • ghcr.io authentication (docker login ghcr.io) — the script prompts if needed; use a GitHub personal access token with the write:packages scope as the password
  • Run from the repository root

Tags pushed

  • ghcr.io/rsscloud/websub-debug:<version> (from package.json — bump it with npm version patch before a release build)
  • ghcr.io/rsscloud/websub-debug:<git-sha>
  • ghcr.io/rsscloud/websub-debug:latest
  • ghcr.io/rsscloud/websub-debug:<custom-tag> (if provided)

Running the published image

Posted items live in memory only, so no volume is needed — restarting the container resets every feed to the single seeded item.

docker run -d -p 3000:3000 \
  -e BASE_URL=https://websub.example.com \
  ghcr.io/rsscloud/websub-debug:latest

BASE_URL must be the externally reachable URL, since it becomes the rel="self" href and the hub.url published to the hub — the hub has to be able to fetch it. See examples/dockge/compose.yaml for a ready-to-paste Dockge stack.