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 4dce669844
commit 4a6fe8db58
4 changed files with 10 additions and 1 deletions

View File

@@ -11,6 +11,8 @@
# ── Stage 1: Build Frontend ────────────────────────────────
FROM node:20-alpine AS frontend-builder
ARG APP_VERSION=0.0.0
ENV APP_VERSION=${APP_VERSION}
WORKDIR /app/frontend

View File

@@ -10,6 +10,8 @@
# #endregion docker.frontend.Dockerfile
FROM node:20-alpine AS build
ARG APP_VERSION=0.0.0
ENV APP_VERSION=${APP_VERSION}
WORKDIR /app/frontend
COPY frontend/package*.json ./