Skip to Content
DeploymentDocker Tagging Strategy

Docker Tagging Strategy

This document describes the Docker image tagging strategy used across Eventuras applications.

Overview

All applications follow a consistent tagging strategy optimized for:

  • GitOps with Argo CD: Predictable tags for automated deployments
  • Traceability: Easy correlation between images and commits
  • Release management: Clean version tags for production

Tag Types

Tag PatternExampleWhen CreatedPurpose
canarylosolio/eventuras:canaryEvery pushLatest build from any branch
mainlosolio/eventuras:mainPush to mainLatest stable build for staging
sha-<full-sha>losolio/eventuras:sha-abc123...Push to mainImmutable reference for releases
main-YYYYMMDD-<sha>losolio/eventuras:main-20260202-abc1234Push to mainHuman-readable with date
dev-pr<n>-<sha>losolio/eventuras:dev-pr42-abc1234Pull requestsPR testing (not pushed)
<version>losolio/eventuras:2.27.1Release tagProduction releases

Environment Mapping

┌─────────────┬────────────────┬─────────────────────────┐ │ Environment │ Image Tag │ Trigger │ ├─────────────┼────────────────┼─────────────────────────┤ │ Development │ canary │ Any branch push │ │ Staging │ main │ Push to main branch │ │ Production │ <version> │ Git tag @app@x.y.z │ └─────────────┴────────────────┴─────────────────────────┘

Argo CD Integration

Development Environment

Argo CD can watch the edge tag for development deployments:

# Argo CD Application values image: tag: edge

Staging Environment

Argo CD watches the canary tag for staging deployments:

# Argo CD Application values image: tag: canary

Production Environment

Production uses explicit version tags created during releases:

# Argo CD Application values image: tag: "v2.27.1"

Release Process

  1. Push to feature branch → Builds with edge, edge-<sha> tags
  2. Merge to main → Builds with canary, main-<sha> tags
  3. Create release tag (e.g., @eventuras/api@2.27.1)
  4. Release workflow → Builds with v2.27.1 and latest tags
  5. Update Argo CD → Point production to new version tag

Applications Using This Strategy

ApplicationImageWorkflow
APIlosolio/eventurasapi-main.yml, api-release.yml
Weblosolio/eventuras-webweb-main.yml, web-release.yml
Idem IDPlosolio/idem-idpidem-idp-main.yml

Multi-Architecture Support

All images are built for multiple architectures:

  • linux/amd64 (x86_64)
  • linux/arm64 (Apple Silicon, ARM servers)

Build Caching

GitHub Actions cache is used for faster builds:

cache-from: type=gha cache-to: type=gha,mode=max

Best Practices

  1. Use edge for development - Latest feature branch build
  2. Use canary for staging - Latest main branch build
  3. Use v* for production - Explicit versioned releases
  4. Use latest only for demo/quick-start - Points to latest stable release
  5. Never use latest in production - Always pin to a specific version
  6. Use SHA tags for debugging - edge-<sha> or main-<sha> for exact builds