chore: fix staging routing, memory limits and nextjs config
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 1m44s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / ⚡ Performance & Accessibility (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled

This commit is contained in:
2026-02-26 02:37:29 +01:00
parent 294907977d
commit 7fb4d306c3
4 changed files with 23 additions and 7 deletions

View File

@@ -346,6 +346,8 @@ jobs:
SITE_DIR="/home/deploy/sites/klz-cables.com" SITE_DIR="/home/deploy/sites/klz-cables.com"
elif [[ "$TARGET" == "testing" ]]; then elif [[ "$TARGET" == "testing" ]]; then
SITE_DIR="/home/deploy/sites/testing.klz-cables.com" SITE_DIR="/home/deploy/sites/testing.klz-cables.com"
elif [[ "$TARGET" == "staging" ]]; then
SITE_DIR="/home/deploy/sites/staging.klz-cables.com"
else else
SITE_DIR="/home/deploy/sites/branch.klz-cables.com/${SLUG:-unknown}" SITE_DIR="/home/deploy/sites/branch.klz-cables.com/${SLUG:-unknown}"
fi fi

View File

@@ -41,6 +41,8 @@ CMD ["pnpm", "dev:local"]
# Build application # Build application
# Stage 3: Builder (Production) # Stage 3: Builder (Production)
FROM base AS builder FROM base AS builder
# Limit memory to 2GB to prevent ResourceExhausted on 4GB runner
ENV NODE_OPTIONS="--max-old-space-size=2048"
RUN pnpm build RUN pnpm build
# Stage 3: Runner # Stage 3: Runner

View File

@@ -66,6 +66,22 @@ services:
- "traefik.http.middlewares.${PROJECT_NAME:-klz}-auth.forwardauth.authResponseHeaders=X-Auth-User" - "traefik.http.middlewares.${PROJECT_NAME:-klz}-auth.forwardauth.authResponseHeaders=X-Auth-User"
- "traefik.docker.network=infra" - "traefik.docker.network=infra"
# Gatekeeper Public Router (Login/Auth UI)
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.rule=(${TRAEFIK_HOST_RULE:-Host(`${TRAEFIK_HOST:-klz-cables.com}`)}) && PathRegexp(`^/(login|gatekeeper)(/.*)?`)"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.entrypoints=${TRAEFIK_ENTRYPOINT:-web}"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-}"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.tls=${TRAEFIK_TLS:-false}"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.service=${PROJECT_NAME:-klz}-gatekeeper-svc"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.priority=2001"
# Gatekeeper Public Router (Login/Auth UI)
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.rule=(${TRAEFIK_HOST_RULE:-Host(`${TRAEFIK_HOST:-klz-cables.com}`)}) && PathRegexp(`^/(login|gatekeeper)(/.*)?`)"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.entrypoints=${TRAEFIK_ENTRYPOINT:-web}"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.tls.certresolver=${TRAEFIK_CERT_RESOLVER:-}"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.tls=${TRAEFIK_TLS:-false}"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.service=${PROJECT_NAME:-klz}-gatekeeper-svc"
- "traefik.http.routers.${PROJECT_NAME:-klz}-gatekeeper.priority=2001"
klz-db: klz-db:
image: postgres:15-alpine image: postgres:15-alpine
restart: unless-stopped restart: unless-stopped

View File

@@ -14,7 +14,6 @@ const nextConfig = {
experimental: { experimental: {
optimizePackageImports: ['lucide-react', 'framer-motion', '@/components/ui'], optimizePackageImports: ['lucide-react', 'framer-motion', '@/components/ui'],
}, },
swcMinify: false,
reactStrictMode: false, reactStrictMode: false,
productionBrowserSourceMaps: false, productionBrowserSourceMaps: false,
logging: { logging: {
@@ -75,14 +74,11 @@ const nextConfig = {
key: 'Permissions-Policy', key: 'Permissions-Policy',
value: 'camera=(), microphone=(), geolocation=(), interest-cohort=()', value: 'camera=(), microphone=(), geolocation=(), interest-cohort=()',
}, },
]; {
if (isProd) {
secureHeaders.push({
key: 'Strict-Transport-Security', key: 'Strict-Transport-Security',
value: 'max-age=63072000; includeSubDomains; preload', value: 'max-age=63072000; includeSubDomains; preload',
}); },
} ];
return [ return [
{ {