Compare commits
2 Commits
23ac4ed8d7
...
229cbf7223
| Author | SHA1 | Date | |
|---|---|---|---|
| 229cbf7223 | |||
| 704a8f09b7 |
@@ -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 ────────────────────────────────────────────────
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -15,6 +15,8 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
BUILD_DATE: "$(date +%d.%m.%Y)"
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tabletten_next",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user