nochmal
This commit is contained in:
@@ -16,6 +16,8 @@ COPY . .
|
|||||||
|
|
||||||
# Standalone-Output aktiviert kleinste Images
|
# Standalone-Output aktiviert kleinste Images
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ENV NEXT_PUBLIC_BUILD_DATE=$BUILD_DATE
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# ── Stage 3: Produktions-Image ────────────────────────────────────────────────
|
# ── Stage 3: Produktions-Image ────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
import LogoutButton from '@/components/LogoutButton';
|
import LogoutButton from '@/components/LogoutButton';
|
||||||
import packageJson from '@/package.json';
|
import packageJson from '@/package.json';
|
||||||
|
|
||||||
@@ -9,7 +10,13 @@ interface AppLayoutProps {
|
|||||||
|
|
||||||
export default function AppLayout({ children }: AppLayoutProps) {
|
export default function AppLayout({ children }: AppLayoutProps) {
|
||||||
const version = packageJson.version;
|
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 (
|
return (
|
||||||
<div className="app-wrapper">
|
<div className="app-wrapper">
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
args:
|
||||||
|
BUILD_DATE: "$(date +%d.%m.%Y)"
|
||||||
platforms:
|
platforms:
|
||||||
- linux/amd64
|
- linux/amd64
|
||||||
- linux/arm64
|
- linux/arm64
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tabletten_next",
|
"name": "tabletten_next",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user