Skip to content

fix(release): keep docker-compose image tags in sync with package version #183

Closed

Description

@gkhngyk

Problem

docker-compose.yml pins the published images to 0.1.0:

image: ghcr.io/ansvisor/ansvisor/web:0.1.0
image: ghcr.io/ansvisor/ansvisor/server:0.1.0

…but the project is already at 0.1.2 (package.json, web/package.json, server/package.json all read "version": "0.1.2"). So docker compose up pulls images two patch releases behind the current code.

Root cause

scripts/version-bump.js only rewrites the three package.json files (its PACKAGE_PATHS array). It never touches docker-compose.yml, so the image tags drift on every release. This is why 0.1.0 was left behind while the packages moved to 0.1.2.

Fix

Two parts:

  1. Correct the current drift — bump the two image: tags in docker-compose.yml from 0.1.0 to 0.1.2.
  2. Stop it recurring — pick one:
    • (a) Teach scripts/version-bump.js to also rewrite the image: ghcr.io/ansvisor/ansvisor/(web|server):<version> tags in docker-compose.yml on each bump (keeps them auto-synced; smallest behavioral change). A simple regex replace of the version suffix is enough.
    • (b) Replace the hardcoded tag with an env var, e.g. image: ghcr.io/ansvisor/ansvisor/web:${ANSVISOR_VERSION:-latest}, so the compose file never hardcodes a version. Document the default in the README/compose comments.

Option (a) is recommended — it keeps docker compose up deterministic (pinned to the released version) while removing the manual step that caused the drift.

Acceptance criteria

  • docker-compose.yml image tags match the current package.json version (0.1.2 at time of writing).
  • A version:bump no longer leaves docker-compose.yml behind — either the script updates it, or the tag is no longer hardcoded.
  • node scripts/version-check.js still passes (extend it to cover the compose tag if going with option (a) and the check is the natural place to assert sync).

Notes

  • The other two console.error … (n/a) — single concern, no unrelated changes.
  • Don't bump the actual package version in this PR; this is only about realigning the compose tags + the bump tooling.

Activity

  1. added
    bug
    good first issue
    on Jun 7, 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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions