mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-11 21:38:55 +00:00
97b2452bd2
The version shown in the UI (backend-sourced via /api/version) could lag the
real release. The canonical version lived at repo-root version.json, but the
backend image is built with context ./backend, so that file did not reach the
container unless a pipeline staged it; the backend then fell back to a hardcoded
constant in main.py that had to be bumped by hand and had drifted (it reported
1.8.4 after 1.8.5 and 1.8.6 shipped).
- version.json moves to backend/version.json (single source of truth), now
committed and co-located with main.py, so COPY . . bakes it into every image
directly - correct version in every deployment, no pipeline staging required.
- backend/main.py reads the co-located file; its in-code fallback is no longer a
real version ("unknown") so it can never silently drift again.
- docker-build.yml reads backend/version.json and drops the staging step;
docker-compose.localtest drops the stale root mount.
- backend/tests/test_version_consistency.py fails the build if main.py hardcodes
a real version, if the canonical file is missing/invalid, or if
frontend/package.json drifts from it.
Bumped to 1.8.7. No functional, schema, API, or agent change. Full suite green.
19 lines
536 B
YAML
19 lines
536 B
YAML
# Local build override for development testing
|
|
# Usage: docker compose -f docker-compose.yml -f docker-compose.localtest.yml up --build -d
|
|
# This overrides the pre-built images with local builds for backend and frontend.
|
|
|
|
services:
|
|
backend:
|
|
image: haproxy-openmanager-backend:localtest
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
volumes:
|
|
- haproxy_configs:/etc/haproxy
|
|
|
|
frontend:
|
|
image: haproxy-openmanager-frontend:localtest
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|