Skip to content

ci: make production deployments rollback-safe #116

Open

Description

@QueryPlanner

Summary

Redesign production deployment so a failed image or readiness check does not leave
the service offline. The current workflow stops the running container and globally
prunes Docker resources before pulling and validating the replacement.

Priority

P1

Level of Effort

Medium (1 day)

Scope

  • Pull and validate the candidate image before stopping the current service.
  • Deploy an immutable SHA tag or digest rather than the mutable main tag.
  • Record the previously healthy image.
  • Automatically restore the previous image if startup or readiness fails.
  • Remove global volume pruning from the application deployment.
  • Restrict cleanup to application-owned, known-safe resources after success.

Passing Criteria

  • The workflow deploys the image produced by the current GitHub Actions run using
    an immutable identifier.
  • An automated deployment harness uses a deliberately failing candidate and proves
    the previous version remains or becomes healthy again.
  • A successful deployment is promoted only after readiness passes.
  • Failure logs identify the candidate and rollback image identifiers.
  • No deployment command prunes unrelated volumes or containers on the host.
  • The deployment documentation includes a tested manual rollback command.

Sources

Activity

  1. added
    enhancement
    on Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions