Update Dockerfile, docker-compose, and package.json; add versioning script and styles for version display

Fix #21
This commit is contained in:
2025-01-30 18:51:25 +01:00
parent d7e96db210
commit 2ebf92a5d5
6 changed files with 49 additions and 21 deletions

17
build.js Normal file
View File

@@ -0,0 +1,17 @@
const fs = require('fs');
const path = require('path');
// Generate version number with timestamp
const version = new Date().toISOString().replace(/[-:.]/g, '').slice(0, 15);
// Read the HTML file
const indexPath = path.join(__dirname, 'public', 'index.html');
let indexHtml = fs.readFileSync(indexPath, 'utf8');
// Replace the version placeholder with the generated version number
indexHtml = indexHtml.replace(/<!-- VERSION_PLACEHOLDER -->/g, `Version: ${version}`);
// Write the updated HTML back to the file
fs.writeFileSync(indexPath, indexHtml);
console.log(`Version number updated to: ${version}`);