You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Implement Git Tag-Driven Version Management System #159
Manual deployment process makes it difficult to track which version each client is running, leading to confusion when managing upgrades across multiple clients.
Current State
CI/CD workflows already build images to GHCR on git tags
Activity
larryro commentedon Jan 9, 2026
Implementation Plan
Step 1: Inject Version into Docker Images
Add version build argument to each service's Dockerfile:
Files to modify:
services/platform/Dockerfileservices/rag/Dockerfileservices/crawler/Dockerfileservices/db/Dockerfileservices/graph-db/Dockerfileservices/proxy/Dockerfileservices/search/DockerfileStep 2: Update CI Workflows to Pass Version
Modify existing
build-and-push-*.ymlworkflows to pass git tag as VERSION:Step 3: Version Health Endpoint
Add/enhance
/api/healthendpoint in Platform service:{ "status": "ok", "version": "v1.0.0" }Version is read from
TALE_VERSIONenvironment variable.Step 4: Unified Release Workflow
Create
.github/workflows/release.yml:v*.*.*tagsStep 5: Modify Existing compose.yml
Add
imageandpull_policyto support both build and pull modes:pull_policyvalues:build- Always build locally (dev mode default)always- Always pull from registry (production mode)Apply same changes to
compose.blue.ymlandcompose.green.yml.Step 6: Upgrade Script
Create
scripts/upgrade.sh:Step 7: Enhance Deploy Script
Add to
scripts/deploy.sh:statuscommand displays current running version via health endpointVERSIONandPULL_POLICYenvironment variablesFiles Summary
compose.ymlcompose.blue.ymlcompose.green.yml.github/workflows/release.yml.github/workflows/build-and-push-*.ymlscripts/upgrade.shscripts/deploy.shservices/*/Dockerfileservices/platform/app/api/health/route.tsWorkflow After Implementation
Release New Version
Client Upgrade
Check Version
./scripts/deploy.sh status # or curl https://customer-domain.com/api/healthRollback
./scripts/deploy.sh rollback # or ./scripts/upgrade.sh v0.9.0Testing Strategy
v0.0.1-test, verify CI builds all imagesdocker compose updefaults to local build (dev mode)PULL_POLICY=always VERSION=v0.0.1-test docker compose uppulls remote images/api/healthreturns correct version./scripts/upgrade.sh v0.0.1-testcomplete upgrade flow🤖 Generated with Claude Code
larryro commentedon Jan 9, 2026
Additional: Private GHCR Authentication
Since the GitHub Container Registry is private, client servers need authentication to pull images.
One-Time Setup on Each Client Server
Create a Personal Access Token (PAT) with
read:packagesscope:read:packagesLogin to GHCR on the client server:
Or interactively:
Verify authentication:
Notes
~/.docker/config.jsonand persist across rebootsread:packagesscope (read-only, minimal permissions)🤖 Generated with Claude Code
feat(docker): add VERSION build argument to all Dockerfiles
feat(ci): pass VERSION build argument in build workflows
feat(ci): add unified release workflow for all services
feat(health): add version field to health endpoint response
feat(compose): add image and pull_policy for GHCR support
feat(scripts): add one-click upgrade script
feat(scripts): display running version in deploy status
refactor(ci): remove branch triggers from build-and-push workflows
feat(docker): add VERSION build argument to all Dockerfiles
feat(ci): pass VERSION build argument in build workflows
feat(ci): add unified release workflow for all services
feat(health): add version field to health endpoint response
feat(compose): add image and pull_policy for GHCR support
feat(scripts): add one-click upgrade script
feat(scripts): display running version in deploy status
refactor(ci): remove branch triggers from build-and-push workflows