Commit Graph

8 Commits

Author SHA1 Message Date
Hermes Agent 4a25b35667 fix: memory bloat from unlimited JVM heap and missing HTTP Range support
Build & Deploy / build-and-deploy (push) Failing after 35s
Two root causes for memory growing to 1.7GB and never shrinking:

1. No -Xmx limit (Dockerfile): JVM grew its heap without bound after
   processing large uploads and never returned memory to the OS. Now capped
   at 128MB with G1GC periodic GC every 30s to shrink when idle.

2. Broken HTTP Range (StaticResource): The server advertised
   Accept-Ranges: bytes but didn't actually handle Range headers —
   every request sent the entire .jsdos file (up to 1.2GB for GTA).
   The OS cached the full file in page cache, which counts against
   Docker container memory and persists after play stops.

   js-dos v7 loads .jsdos via Range requests (lazy ZIP loading).
   Now properly parses Range: bytes=start-end headers, responds with
   206 Partial Content, and seeks to exact offsets in the file —
   only the requested bytes stream through, keeping page cache minimal.
2026-06-03 15:38:22 +02:00
Hermes Agent 4a3ba3b986 perf: switch build stages to Alpine for faster CI pulls
Build & Deploy / build-and-deploy (push) Successful in 1m18s
- node:20-bookworm → node:20-alpine (350MB → 130MB)
- maven:3-eclipse-temurin-21 → maven:3-eclipse-temurin-21-alpine (630MB → 200MB)

Runtime stage (eclipse-temurin:21-jre-alpine) unchanged — final
image size stays the same, but CI caches and pulls are faster.
2026-06-03 09:22:42 +02:00
David Alvarez 5579afb5e7 Fix pom.xml: remove quarkus-rest-multipart (built into quarkus-rest), add maven-resources-plugin version; fix Dockerfile: DOSTALGIA_DATA -> DOSTALGIA_DATA_DIR 2026-05-25 09:29:22 +02:00
David Alvarez 28ea711b24 Migrate backend from Go to Quarkus (Java 21 / JAX-RS)
- Replaced Go stdlib server with Quarkus (RESTEasy Reactive + Jackson)
- 7 Java classes: Game POJO, GameService (JSON file I/O), 4 REST resources, static file serving
- Same JSON-per-game storage, same ZIP upload + bundle creation
- Same Svelte frontend (unchanged), built into the JAR via maven-resources-plugin
- Multi-stage Dockerfile: Node → Maven → JRE runtime
2026-05-24 15:41:51 +02:00
David Alvarez df5ce4f127 Fix: remove --only=production flag so devDependencies (vite, svelte plugin) are installed 2026-05-23 18:28:05 +02:00
David Alvarez aad4ec21a6 Fix Docker build: Debian Node image, npx vite build, .dockerignore 2026-05-23 18:13:00 +02:00
David Alvarez 70fba6d14a Fix Dockerfile: use --legacy-peer-deps for npm install, simplify build stages 2026-05-23 18:07:25 +02:00
David Alvarez 1efd10f81f Initial commit: Dostalgia — DOS game hub
- Go backend (single binary) with embedded Svelte frontend
- JSON-per-game storage (no database)
- .jsdos bundle creation on upload
- Dark phosphor-green theme (#33FF33)
- js-dos v8 emulator integration
- Sockdrive support for games >80MB
- IGDB placeholder for future artwork scraping
- Docker deployment ready
2026-05-23 11:18:41 +02:00