compose.yaml overrode the image's own entrypoint to start "tsx watch" and "next dev" with CHOKIDAR_USEPOLLING and WATCHPACK_POLLING enabled. The built dist/ and .next from the image were never used, and the polling watchers kept both containers busy around the clock whether or not anyone used the application. Split the two use cases: compose.yaml now runs node dist/server/index.js and next start with no source mounts and no watchers, and the watching setup moves to compose.dev.yaml. next build writes the rewrite destinations from next.config.mjs into .next/routes-manifest.json, so next start cannot pick up API_INTERNAL_URL at runtime the way next dev does. Pass it as a build argument. Give the web container its own probe. The healthcheck hit "/", which redirects to "/projects", and fetch follows redirects, so every probe rendered two pages every five seconds. "/health" could not serve as the probe because next.config.mjs rewrites it to the API. Add "/web-health" as a route handler, exclude it from the proxy matcher, and relax both intervals to 30s. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
56 lines
1.9 KiB
JSON
56 lines
1.9 KiB
JSON
{
|
|
"name": "leistungsbilanz",
|
|
"version": "1.0.0",
|
|
"description": "Spreadsheet-style circuit list editor for electrical distribution planning",
|
|
"main": "dist/server/index.js",
|
|
"engines": {
|
|
"node": "24.x"
|
|
},
|
|
"scripts": {
|
|
"dev": "npm run dev:api",
|
|
"dev:api": "tsx watch src/server/index.ts",
|
|
"dev:web": "next dev -p 3001",
|
|
"docker:up": "docker compose up --build --detach",
|
|
"docker:down": "docker compose down",
|
|
"docker:logs": "docker compose logs --follow",
|
|
"docker:dev:up": "docker compose -f compose.dev.yaml up --build --detach",
|
|
"docker:dev:down": "docker compose -f compose.dev.yaml down",
|
|
"docker:dev:logs": "docker compose -f compose.dev.yaml logs --follow",
|
|
"build": "npm run build:api",
|
|
"build:api": "tsc -p tsconfig.json",
|
|
"build:web": "next build",
|
|
"typecheck:scripts": "tsc --noEmit -p tsconfig.scripts.json",
|
|
"start": "node dist/server/index.js",
|
|
"test": "node scripts/run-tests.mjs",
|
|
"test:watch": "node scripts/run-tests.mjs --watch",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:backup": "tsx scripts/db-backup.ts",
|
|
"db:verify:circuit-schema": "node scripts/db-verify-circuit-schema.js",
|
|
"revit:verify-reference": "tsx scripts/verify-revit-reference-csv.ts"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"better-sqlite3": "^12.9.0",
|
|
"bootstrap": "^5.3.8",
|
|
"drizzle-orm": "^0.45.2",
|
|
"express": "^5.2.1",
|
|
"lucide-react": "^1.14.0",
|
|
"next": "^16.2.4",
|
|
"react": "^19.2.5",
|
|
"react-dom": "^19.2.5",
|
|
"zod": "^4.4.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^24.10.1",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"drizzle-kit": "^0.31.10",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^6.0.3"
|
|
}
|
|
}
|