Skip to content

Fix Docker SQLite startup crash with production DB initialization#41

Merged
antosubash merged 1 commit intomainfrom
feature/objective-khorana
Apr 1, 2026
Merged

Fix Docker SQLite startup crash with production DB initialization#41
antosubash merged 1 commit intomainfrom
feature/objective-khorana

Conversation

@antosubash
Copy link
Copy Markdown
Owner

Changes

  • Docker: Increase Node.js heap size to 512MB during build and create writable /app/data and /app/storage directories for SQLite and local storage
  • Database initialization: Allow SQLite to auto-initialize in production (file-based DBs need the file created), while managed databases skip this in production
  • SimpleModuleOptions: Track detected database provider during startup validation
  • Production settings: Add appsettings.Production.json with SQLite path pointing to /app/data/app.db
  • Build concurrency: Limit parallel workspace builds to 4 (configurable via BUILD_CONCURRENCY) to prevent OOM in memory-constrained environments

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 1, 2026

Deploying simplemodule-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 83b8b7e
Status: ✅  Deploy successful!
Preview URL: https://6af1880c.simplemodule-website.pages.dev
Branch Preview URL: https://feature-objective-khorana.simplemodule-website.pages.dev

View logs

SQLite auto-initializes via MigrateAsync regardless of environment since
the DB file may not exist. Managed databases (PostgreSQL, SQL Server)
still skip initialization in production. Build orchestrator limits Vite
concurrency to prevent OOM in memory-constrained Docker builds.
@antosubash antosubash force-pushed the feature/objective-khorana branch from cb61fb1 to 83b8b7e Compare April 1, 2026 10:08
@antosubash antosubash merged commit 3e38b4b into main Apr 1, 2026
4 checks passed
@antosubash antosubash deleted the feature/objective-khorana branch April 1, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant