fix(version): inject APP_VERSION via Docker build-arg instead of git describe

In Docker builds, .git directory is not available in the container,
so git describe --tags fails and fallback is '0.0.0'. Now:
- build.sh passes --build-arg APP_VERSION=${tag} to frontend build
- Dockerfile accepts ARG APP_VERSION and sets ENV
- vite.config.js checks process.env.APP_VERSION first, then git describe
This commit is contained in:
2026-06-18 18:37:11 +03:00
parent 335a1ea846
commit bcab488e83
4 changed files with 10 additions and 1 deletions

View File

@@ -222,7 +222,7 @@ bundle_release() {
docker build -f docker/backend.Dockerfile -t "${backend_tag}" .
echo "[bundle] Building frontend image ${frontend_tag}..."
docker build -f docker/frontend.Dockerfile -t "${frontend_tag}" .
docker build --build-arg "APP_VERSION=${tag}" -f docker/frontend.Dockerfile -t "${frontend_tag}" .
echo "[bundle] Building agent image ${agent_tag}..."
docker build -f docker/Dockerfile.agent -t "${agent_tag}" .