fix: directus
Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 8s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 6m36s
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Successful in 23s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Successful in 11m59s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Successful in 43s
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Failing after 7m22s
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
Some checks failed
Build & Deploy KLZ Cables / 🔍 Prepare Environment (push) Successful in 8s
Build & Deploy KLZ Cables / 🏗️ Build App (push) Successful in 6m36s
Build & Deploy KLZ Cables / 🏗️ Build Gatekeeper (push) Successful in 23s
Build & Deploy KLZ Cables / 🧪 Quality Assurance (push) Successful in 11m59s
Build & Deploy KLZ Cables / 🚀 Deploy (push) Successful in 43s
Build & Deploy KLZ Cables / ⚡ PageSpeed (push) Failing after 7m22s
Build & Deploy KLZ Cables / 🔔 Notifications (push) Successful in 2s
This commit is contained in:
6
.env
6
.env
@@ -28,4 +28,8 @@ DIRECTUS_ADMIN_EMAIL=marc@mintel.me
|
|||||||
DIRECTUS_ADMIN_PASSWORD=Tim300493.
|
DIRECTUS_ADMIN_PASSWORD=Tim300493.
|
||||||
DIRECTUS_DB_NAME=directus
|
DIRECTUS_DB_NAME=directus
|
||||||
DIRECTUS_DB_USER=directus
|
DIRECTUS_DB_USER=directus
|
||||||
DIRECTUS_DB_PASSWORD=directus
|
# Local Development
|
||||||
|
PROJECT_NAME=klz-cables
|
||||||
|
TRAEFIK_HOST=klz.localhost
|
||||||
|
DIRECTUS_HOST=cms.klz.localhost
|
||||||
|
GATEKEEPER_PASSWORD=klz2026
|
||||||
|
|||||||
@@ -9,18 +9,27 @@ services:
|
|||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
# Docker Internal Communication
|
# Docker Internal Communication
|
||||||
DIRECTUS_URL: http://directus:8055
|
DIRECTUS_URL: http://directus:8055
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.klz-app-local.rule=Host(`klz.localhost`)"
|
# Clear all production-related TLS/Middleware settings for the main routers
|
||||||
- "traefik.http.routers.klz-app-local.entrypoints=web"
|
- "traefik.http.routers.klz-cables.entrypoints=web"
|
||||||
- "traefik.http.routers.klz-app-local.service=klz-cables"
|
- "traefik.http.routers.klz-cables.rule=Host(`klz.localhost`)"
|
||||||
|
- "traefik.http.routers.klz-cables.tls=false"
|
||||||
|
- "traefik.http.routers.klz-cables.middlewares="
|
||||||
|
|
||||||
|
- "traefik.http.routers.klz-cables-web.entrypoints=web"
|
||||||
|
- "traefik.http.routers.klz-cables-web.rule=Host(`klz.localhost`)"
|
||||||
|
- "traefik.http.routers.klz-cables-web.middlewares="
|
||||||
|
|
||||||
directus:
|
directus:
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.klz-directus-local.rule=Host(`cms.klz.localhost`)"
|
- "traefik.http.routers.klz-cables-directus.entrypoints=web"
|
||||||
- "traefik.http.routers.klz-directus-local.entrypoints=web"
|
- "traefik.http.routers.klz-cables-directus.rule=Host(`cms.klz.localhost`)"
|
||||||
- "traefik.http.routers.klz-directus-local.service=klz-directus"
|
- "traefik.http.routers.klz-cables-directus.tls=false"
|
||||||
|
- "traefik.http.routers.klz-cables-directus.middlewares="
|
||||||
ports:
|
ports:
|
||||||
- "8055:8055"
|
- "8055:8055"
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -140,9 +140,9 @@ export async function checkHealth() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Schema check (does the products table exist?)
|
// 2. Schema check (does the contact_submissions table exist?)
|
||||||
try {
|
try {
|
||||||
await client.request(readItems('products', { limit: 1 }));
|
await client.request(readItems('contact_submissions', { limit: 1 }));
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
if (typeof window === 'undefined') {
|
if (typeof window === 'undefined') {
|
||||||
getServerAppServices().errors.captureException(e, { part: 'directus_health_schema' });
|
getServerAppServices().errors.captureException(e, { part: 'directus_health_schema' });
|
||||||
@@ -155,7 +155,7 @@ export async function checkHealth() {
|
|||||||
return {
|
return {
|
||||||
status: 'error',
|
status: 'error',
|
||||||
message: shouldShowDevErrors
|
message: shouldShowDevErrors
|
||||||
? `The "products" collection is missing or inaccessible. Error: ${e.message || 'Unknown'}`
|
? `The "contact_submissions" collection is missing or inaccessible. Error: ${e.message || 'Unknown'}`
|
||||||
: 'Required data structures are currently unavailable.',
|
: 'Required data structures are currently unavailable.',
|
||||||
code: 'SCHEMA_MISSING',
|
code: 'SCHEMA_MISSING',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
"name": "klz-cables-nextjs",
|
"name": "klz-cables-nextjs",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker network create infra 2>/dev/null || true && echo '\\n🚀 Development Environment Starting...\\n\\n📱 App: http://klz.localhost\\n🗄️ CMS: http://cms.klz.localhost/admin\\n🚦 Traefik: http://localhost:8080\\n\\n(Press Ctrl+C to stop)\\n' && docker-compose down --remove-orphans && docker-compose up",
|
"dev": "docker network create infra 2>/dev/null || true && echo '\\n🚀 Development Environment Starting...\\n\\n📱 App: http://klz.localhost\\n🗄️ CMS: http://cms.klz.localhost/admin\\n🚦 Traefik: http://localhost:8080\\n\\n(Press Ctrl+C to stop)\\n' && docker-compose down --remove-orphans && docker-compose up app directus directus-db",
|
||||||
"dev:local": "next dev",
|
"dev:local": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"test": "vitest run --passWithNoTests",
|
"test": "vitest run --passWithNoTests",
|
||||||
"test:og": "vitest run tests/og-image.test.ts",
|
"test:og": "vitest run tests/og-image.test.ts",
|
||||||
"bootstrap:cms": "DIRECTUS_URL=http://localhost:8055 npx tsx --env-file=.env scripts/setup-directus-branding.ts",
|
"directus:bootstrap": "DIRECTUS_URL=http://localhost:8055 npx tsx --env-file=.env scripts/setup-directus-branding.ts",
|
||||||
"pdf:datasheets": "tsx ./scripts/generate-pdf-datasheets.ts",
|
"pdf:datasheets": "tsx ./scripts/generate-pdf-datasheets.ts",
|
||||||
"pdf:datasheets:legacy": "tsx ./scripts/generate-pdf-datasheets-pdf-lib.ts",
|
"pdf:datasheets:legacy": "tsx ./scripts/generate-pdf-datasheets-pdf-lib.ts",
|
||||||
"directus:push:staging": "./scripts/sync-directus.sh push staging",
|
"directus:push:staging": "./scripts/sync-directus.sh push staging",
|
||||||
|
|||||||
Reference in New Issue
Block a user