feat: Implement Docker version reporting by extracting git tag to an environment variable for API consumption.
This commit is contained in:
@@ -3,6 +3,11 @@ import { execSync } from 'child_process';
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
// First check if version is set via environment variable (Docker build)
|
||||
if (process.env.APP_VERSION) {
|
||||
return NextResponse.json({ version: process.env.APP_VERSION });
|
||||
}
|
||||
|
||||
// Try to get the git tag/version
|
||||
let version = 'dev';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user