Compare commits

...

2 Commits

Author SHA1 Message Date
rxf
229cbf7223 nochmal 2026-03-19 11:29:36 +01:00
rxf
704a8f09b7 Buid-Date updated 2026-03-19 11:29:08 +01:00
5 changed files with 16 additions and 3 deletions

View File

@@ -16,6 +16,8 @@ COPY . .
# Standalone-Output aktiviert kleinste Images
ENV NEXT_TELEMETRY_DISABLED=1
ARG BUILD_DATE
ENV NEXT_PUBLIC_BUILD_DATE=$BUILD_DATE
RUN npm run build
# ── Stage 3: Produktions-Image ────────────────────────────────────────────────

View File

@@ -1,5 +1,6 @@
'use client';
import { useEffect, useState } from 'react';
import LogoutButton from '@/components/LogoutButton';
import packageJson from '@/package.json';
@@ -9,7 +10,13 @@ interface AppLayoutProps {
export default function AppLayout({ children }: AppLayoutProps) {
const version = packageJson.version;
const buildDate = process.env.NEXT_PUBLIC_BUILD_DATE || new Date().toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' });
const [buildDate, setBuildDate] = useState(process.env.NEXT_PUBLIC_BUILD_DATE || '');
useEffect(() => {
if (!buildDate) {
setBuildDate(new Date().toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' }));
}
}, []);
return (
<div className="app-wrapper">

View File

@@ -2,13 +2,15 @@
# Lokaler Betrieb MySQL läuft bereits auf dem Host (localhost)
#
# Start:
# docker compose -f docker-compose.local.yml up --build
# BUILD_DATE=$(date +%d.%m.%Y) docker compose -f docker-compose.local.yml up --build
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_DATE: "$(date +%d.%m.%Y)"
restart: unless-stopped
ports:
- "3000:3000"

View File

@@ -15,6 +15,8 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_DATE: "$(date +%d.%m.%Y)"
platforms:
- linux/amd64
- linux/arm64

View File

@@ -1,6 +1,6 @@
{
"name": "tabletten_next",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"dev": "next dev",