Commit graph

21 commits

Author SHA1 Message Date
2e3e85a8e5 Harden the container runtime and shut down cleanly
Running the stack on built output stopped the idle CPU load, but the
remaining findings from the deployment report were still open.

The Dockerfile is now multi-stage. The prod target runs on node:24-slim as
the "node" user instead of root and carries only its runtime dependencies;
"npm prune --omit=dev" drops tsx, drizzle-kit and typescript. The migration
scripts need drizzle-orm and better-sqlite3, both regular dependencies, so
they keep working. The dev target keeps devDependencies for compose.dev.yaml.

Both compose files get a mem_limit. The server stack also sets memswap_limit
to the same value, so a leak lets the OOM killer replace the container
instead of pushing the host into swap. The Express API is no longer
published on the host: it has no authentication and is reached through the
Next.js rewrite. Development ports are bound to the loopback interface.
Services drop all capabilities and run with no-new-privileges.

SIGTERM and SIGINT now close the HTTP server and the SQLite handle and exit,
instead of only logging the signal and waiting for the container's SIGKILL
ten seconds later. server.closeIdleConnections() releases the keep-alive
sockets the Next.js server holds, which would otherwise keep server.close()
pending for the whole grace period. The compose start commands exec into
node, because otherwise sh stays the foreground process and the signal never
reaches it.

Delete scripts/docker-start.sh rather than fixing its unsupervised
background API: both compose stacks set their own command, so the
single-container entrypoint has no caller left. Also remove drizzle.config.js
(a stray tsc artifact drizzle-kit never reads) and the pre-Next index.html
and styles.css.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:04:34 +02:00
Grovy311
9bd22dfcb7 Add AMEV Gleichzeitigkeitsfaktor-Auswähler und einklappbare Seitenleiste
- Gzf-Picker-Modal mit AMEV-Tabelle 3 (Planungshilfe für elektrische
  Leistungsbilanzen) im Projektgerät-Modal und im globalen Geräteformular
- Docker-Deploy-Tooling (docker-start.sh, run-migrations.js) für den
  produktiven Container
- Seitenleiste ist jetzt einklappbar (Icon-only, Zustand in localStorage)
2026-08-03 17:07:14 +02:00
dac19b093c Add external row quantity foundation 2026-08-02 18:26:22 +02:00
caa6caf99f Add Revit CSV preview API 2026-08-02 16:49:42 +02:00
da689af518 Verify Revit reference CSV 2026-08-02 16:01:05 +02:00
44b6fde940 Add public building project setting 2026-07-31 17:41:30 +02:00
734a2bcfc4 Create clean release database baseline 2026-07-31 14:07:26 +02:00
e7607c90c4 Add component persistence foundation 2026-07-30 19:15:00 +02:00
b1a11397b3 Add configurable distribution supply types 2026-07-29 09:31:20 +02:00
d77cfbeb49 Add versioned project settings modal 2026-07-28 18:16:22 +02:00
d7b98de56a Inject application database contexts 2026-07-26 12:30:42 +02:00
859fa4a42a Decouple legacy migration service 2026-07-26 12:11:05 +02:00
08a2775a88 Persist device row moves 2026-07-25 21:09:02 +02:00
30d6f1a2e1 Remove project device mirror fields 2026-07-23 20:55:26 +02:00
d7ce135ac8 Verify legacy migration completion 2026-07-23 19:16:41 +02:00
030f18aeb0 Verify SQLite backups and restores 2026-07-23 19:12:14 +02:00
4d5eb22e66 Isolate legacy migration transactions 2026-07-23 19:06:30 +02:00
30c7555c68 Isolate device row transactions 2026-07-23 18:33:22 +02:00
5dc3ab90be Prepare circuits for future sizing 2026-07-22 20:53:04 +02:00
9d07ed9856 Align project devices with circuit model 2026-07-22 19:31:08 +02:00
d1ce485572 Added 1B, 2 and added bootstrap again for site 2026-05-03 22:04:45 +02:00