Compare commits

..

3 Commits

Author SHA1 Message Date
Daniel Bedeleanu
55e3cf5042 Build [v1.8.5] (Self-contained Frontend Build) 2026-04-13 19:50:28 +03:00
Daniel Bedeleanu
c874d27d64 Build [v1.8.4] (Satisfy frontend relative VERSION.json path) 2026-04-13 19:44:52 +03:00
Daniel Bedeleanu
939ad8648d Build [v1.8.3] (Explicit directory creation in bundle) 2026-04-13 19:39:33 +03:00
8 changed files with 17 additions and 17 deletions

View File

@@ -146,5 +146,5 @@ For detailed technical documentation, see the [Project Architecture](../PROJECT_
---
**Version:** v1.8.2
**Version:** v1.8.4
**Last Updated:** 2026-04-13

View File

@@ -1,5 +0,0 @@
{
"version": "1.8.2",
"last_build": "2026-04-13-1939",
"codename": "ConfigSync"
}

View File

@@ -23,8 +23,7 @@ services:
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
context: ./frontend
networks:
- inventory_net
ports:

View File

@@ -3,8 +3,8 @@
echo "📦 Preparing TFM aInventory Production Bundle..."
# Extract version from VERSION.json using grep to avoid macOS python/xcode stubs
VERSION=$(grep '"version"' VERSION.json | head -n 1 | awk -F '"' '{print $4}')
# Extract version from frontend/VERSION.json
VERSION=$(grep '"version"' frontend/VERSION.json | head -n 1 | awk -F '"' '{print $4}')
PROD_DIR="aInventory-PROD-v${VERSION}"
# Clean previous run if it exists
@@ -19,6 +19,7 @@ rsync -a --exclude 'node_modules' --exclude '.next' frontend/ "$PROD_DIR/fronten
rsync -a --exclude '__pycache__' --exclude '.pytest_cache' --exclude '.venv' --exclude 'tests' backend/ "$PROD_DIR/backend/"
# Orchestration, Config & Scripts
mkdir -p "$PROD_DIR/config" "$PROD_DIR/scripts"
cp docker-compose.yml "$PROD_DIR/"
rsync -a config/ "$PROD_DIR/config/"
rsync -a scripts/ "$PROD_DIR/scripts/"
@@ -29,7 +30,8 @@ cp inventory.service.template "$PROD_DIR/"
cp USER_GUIDE.md "$PROD_DIR/"
cp README.md "$PROD_DIR/INSTALLATION_GUIDE.md"
cp .git_path "$PROD_DIR/" 2>/dev/null || true
cp VERSION.json "$PROD_DIR/"
cp frontend/VERSION.json "$PROD_DIR/"
cp frontend/VERSION.json "$PROD_DIR/frontend/"
# Setup persistent volume skeleton
mkdir -p "$PROD_DIR/data"

View File

@@ -4,16 +4,15 @@ FROM node:20-alpine AS base
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Context is root to allow access to VERSION.json
COPY frontend/package.json frontend/package-lock.json* ./
# We run this from the frontend folder context
COPY package.json package-lock.json* ./
RUN npm ci
# Step 2: Build the source code
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY frontend .
COPY VERSION.json .
COPY . .
# Disable telemetry during build
ENV NEXT_TELEMETRY_DISABLED 1
RUN npm run build

5
frontend/VERSION.json Normal file
View File

@@ -0,0 +1,5 @@
{
"version": "1.8.5",
"last_build": "2026-04-13-1951",
"codename": "ConfigSync"
}

View File

@@ -48,7 +48,7 @@ import { generateBarcode128, getQRCodeURL } from '@/lib/labels';
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
import axios from 'axios';
import versionData from '../../VERSION.json';
import versionData from '../VERSION.json';
interface User {
id: number;

View File

@@ -4,7 +4,7 @@ import os
import sys
from datetime import datetime
VERSION_FILE = 'VERSION.json'
VERSION_FILE = 'frontend/VERSION.json'
GIT_PATH_FILE = '.git_path'
def get_git_path():