Compare commits
9 Commits
v2.1.0-rc.
...
v2.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| e1101f2e60 | |||
| 0be6076512 | |||
| 62400943c2 | |||
| 4c60029e21 | |||
| b3c5b911d9 | |||
| 89f00c79a1 | |||
| 98ac3dbd10 | |||
| 0db4c819ff | |||
| 08a3b0be7b |
10
.env
10
.env
@@ -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
|
||||
@@ -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 }}
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
12
package.json
12
package.json
@@ -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",
|
||||
|
||||
@@ -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: [],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user