Compare commits

..

9 Commits

Author SHA1 Message Date
e1101f2e60 fix(ci): update to v1.8.21 for x86 base images
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Failing after 13s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-02-26 19:44:29 +01:00
0be6076512 chore: trigger x86 ci build
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m48s
Build & Deploy / 🏗️ Build (push) Failing after 29s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-02-26 19:04:46 +01:00
62400943c2 chore: trigger x86 build for klz-2026
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m52s
Build & Deploy / 🏗️ Build (push) Failing after 1m38s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-02-26 18:45:51 +01:00
4c60029e21 fix(ci): update build platform from arm64 to amd64
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m0s
Build & Deploy / 🏗️ Build (push) Failing after 22s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-02-26 17:44:59 +01:00
b3c5b911d9 perf(ci): safely relax Turbopack and Node thread pools from 1 to 3 cores to restore build speeds
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Has been cancelled
2026-02-26 15:12:02 +01:00
89f00c79a1 fix(ci): throttle build CPU usage by limiting rayon and libuv threads to prevent host resource starvation
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Successful in 12m0s
Build & Deploy / 🚀 Deploy (push) Successful in 34s
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
2026-02-26 14:29:50 +01:00
98ac3dbd10 fix(routing): restore middleware.ts to fix catastrophic next-intl 404s on staging and testing
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Failing after 37m19s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
2026-02-26 14:12:01 +01:00
0db4c819ff fix(ci): disable next.js memory workers to prevent drone runner deadline exceeded crashes and suppress payload nodemailer verification spam during static export
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 2m47s
Build & Deploy / 🏗️ Build (push) Successful in 3m53s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 12m9s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-02-26 13:18:38 +01:00
08a3b0be7b fix(routing): restore middleware.ts to fix next-intl 404s and resolve testing host poisoning
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 13s
Build & Deploy / 🧪 QA (push) Successful in 2m6s
Build & Deploy / 🏗️ Build (push) Failing after 8m33s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-02-26 12:45:37 +01:00
8 changed files with 47 additions and 29 deletions

10
.env
View File

@@ -25,3 +25,13 @@ MAIL_RECIPIENTS=marc@cablecreations.de,info@klz-cables.com
PAYLOAD_DB_NAME=payload
PAYLOAD_DB_USER=payload
PAYLOAD_DB_PASSWORD=120in09oenaoinsd9iaidon
# ────────────────────────────────────────────────────────────────────────────
# Hetzner S3 Object Storage
# ────────────────────────────────────────────────────────────────────────────
S3_ENDPOINT=https://fsn1.your-objectstorage.com
S3_ACCESS_KEY=ROB3MSWMEIGRL7N94ZKS
S3_SECRET_KEY=9QJV3NE8xeLxhyufhNU7lsUB0RffJxPhGuEuFSH3
S3_BUCKET=mintel
S3_REGION=fsn1
S3_PREFIX=klz-cables

View File

@@ -208,7 +208,7 @@ jobs:
context: .
push: true
provenance: false
platforms: linux/arm64
platforms: linux/amd64
build-args: |
NEXT_PUBLIC_BASE_URL=${{ needs.prepare.outputs.next_public_url }}
NEXT_PUBLIC_TARGET=${{ needs.prepare.outputs.target }}

View File

@@ -1,5 +1,5 @@
# Stage 1: Builder
FROM registry.infra.mintel.me/mintel/nextjs:v1.7.10 AS base
FROM registry.infra.mintel.me/mintel/nextjs:v1.8.21 AS base
WORKDIR /app
# Arguments for build-time configuration
@@ -43,10 +43,15 @@ CMD ["pnpm", "dev:local"]
FROM base AS builder
# Limit memory to 1GB to prevent ResourceExhausted in combination with worker limits
ENV NODE_OPTIONS="--max-old-space-size=1024"
# Force Turbopack (Rust/Rayon) and Node.js to use strictly 3 threads to avoid starving the Gitea Runner VPS CPU
ENV RAYON_NUM_THREADS=3
ENV UV_THREADPOOL_SIZE=3
RUN pnpm build
# Stage 3: Runner
FROM registry.infra.mintel.me/mintel/runtime:v1.7.10 AS runner
# Stage 2: Runner
FROM registry.infra.mintel.me/mintel/runtime:v1.8.21 AS runner
WORKDIR /app
# Create nextjs user and group (standardized in runtime image but ensuring local ownership)

View File

@@ -462,3 +462,4 @@ Proprietary - KLZ Cables
**Status**: ✅ **READY FOR DEPLOYMENT**
**Version**: 1.0.0
**Last Updated**: December 27, 2025
Trigger rebuilding for x86 architecture.

View File

@@ -45,8 +45,10 @@ export default async function middleware(request: NextRequest) {
if (internalHosts.includes(urlObj.hostname)) {
const proto = headers.get('x-forwarded-proto') || 'https';
// Prioritize x-forwarded-host (passed by Traefik) over the local Host header
const hostHeader =
headers.get('x-forwarded-host') || headers.get('host') || 'testing.klz-cables.com';
const fallbackHost = process.env.NEXT_PUBLIC_BASE_URL
? new URL(process.env.NEXT_PUBLIC_BASE_URL).host
: 'klz-cables.com';
const hostHeader = headers.get('x-forwarded-host') || headers.get('host') || fallbackHost;
urlObj.protocol = proto;

View File

@@ -13,9 +13,8 @@ const nextConfig = {
},
experimental: {
optimizePackageImports: ['lucide-react', 'framer-motion', '@/components/ui'],
cpus: 1,
cpus: 3,
workerThreads: false,
memoryBasedWorkersCount: true,
},
reactStrictMode: false,
productionBrowserSourceMaps: false,

View File

@@ -4,10 +4,10 @@
"private": true,
"packageManager": "pnpm@10.18.3",
"dependencies": {
"@mintel/mail": "1.8.3",
"@mintel/next-config": "1.8.3",
"@mintel/next-feedback": "1.8.10",
"@mintel/next-utils": "^1.7.15",
"@mintel/mail": "^1.8.21",
"@mintel/next-config": "^1.8.21",
"@mintel/next-feedback": "^1.8.21",
"@mintel/next-utils": "^1.8.21",
"@payloadcms/db-postgres": "^3.77.0",
"@payloadcms/email-nodemailer": "^3.77.0",
"@payloadcms/next": "^3.77.0",
@@ -53,8 +53,8 @@
"@commitlint/config-conventional": "^20.4.0",
"@cspell/dict-de-de": "^4.1.2",
"@lhci/cli": "^0.15.1",
"@mintel/eslint-config": "1.8.3",
"@mintel/tsconfig": "1.8.3",
"@mintel/eslint-config": "^1.8.21",
"@mintel/tsconfig": "^1.8.21",
"@next/bundle-analyzer": "^16.1.6",
"@tailwindcss/cli": "^4.1.18",
"@tailwindcss/postcss": "^4.1.18",

View File

@@ -45,9 +45,7 @@ export default buildConfig({
},
meta: {
titleSuffix: ' KLZ Cables',
icons: [
{ rel: 'icon', type: 'image/x-icon', url: '/favicon.ico' },
],
icons: [{ rel: 'icon', type: 'image/x-icon', url: '/favicon.ico' }],
},
},
localization: {
@@ -80,18 +78,21 @@ export default buildConfig({
`postgresql://${process.env.PAYLOAD_DB_USER || 'payload'}:${process.env.PAYLOAD_DB_PASSWORD || '120in09oenaoinsd9iaidon'}@127.0.0.1:54322/${process.env.PAYLOAD_DB_NAME || 'payload'}`,
},
}),
email: nodemailerAdapter({
defaultFromAddress: process.env.MAIL_FROM?.replace(/.*<|>.*/g, '') || 'postmaster@mg.mintel.me',
defaultFromName: process.env.MAIL_FROM?.split('<')[0]?.trim() || 'KLZ Cables',
transportOptions: {
host: process.env.MAIL_HOST || 'smtp.eu.mailgun.org',
port: Number(process.env.MAIL_PORT) || 587,
auth: {
user: process.env.MAIL_USERNAME,
pass: process.env.MAIL_PASSWORD,
},
},
}),
email: process.env.MAIL_HOST
? nodemailerAdapter({
defaultFromAddress:
process.env.MAIL_FROM?.replace(/.*<|>.*/g, '') || 'postmaster@mg.mintel.me',
defaultFromName: process.env.MAIL_FROM?.split('<')[0]?.trim() || 'KLZ Cables',
transportOptions: {
host: process.env.MAIL_HOST || 'smtp.eu.mailgun.org',
port: Number(process.env.MAIL_PORT) || 587,
auth: {
user: process.env.MAIL_USERNAME,
pass: process.env.MAIL_PASSWORD,
},
},
})
: undefined,
sharp,
plugins: [],
});