- removed legacy Prisma SQLite driver and all Better-Sqlite dependencies [Minor] - updated schema to utilize purely postgresql providers [Patch] - modified migration scripts to seamlessly convert local sqlite DBs to PostgreSQL containers using keinos/sqlite3 [Minor] - updated deployment scripts, Coolify pipelines, and Nginx proxy support [Patch] - injected Prisma Client Extensions for multi-tenant Row Level Security isolation [Minor] - stabilized PrismaClient initialization utilizing the official adapter-pg runtime pattern [Patch] - bumped version to 2.1.0
2.1 KiB
2.1 KiB
Deployment
Overview
WorldWideView utilizes a containerized deployment strategy based on Docker's multi-stage builds. To minimize the footprint of the Next.js runtime, it leverages the Next.js standalone output trace, effectively dropping unnecessary development dependencies and generating a highly optimized Node.js artifact.
Package Types
Main Application
- Build Output: Located at
.next/standalone/. - Static Assets: Cesium static workers are injected at build time via
scripts/copy-cesium.mjs.
Plugin Microservices
- Standalone plugin backends (e.g.,
wwv-plugin-iranwarlive/backend) are isolated via individualDockerfileconfigurations and orchestrated together in production usingdocker-compose.yml.
Platform Deployment
Coolify Integration
WorldWideView deploys optimally to Coolify using a Dockerfile builder.
- Environment Variables: Must be explicitly mapped in the Coolify UI (e.g.,
DATABASE_URL,AUTH_SECRET). - Persistent Storage: PostgreSQL databases must be hosted externally or mounted via persistent volumes to ensure the frontend registry (installed plugins, user configs) survives container rebuilds.
- Microservices Deployment: The
wwv-data-engine-internaland associated plugin seeders are deployed as separate Coolify services communicating over private internal networks.
Docker Structure
- Dockerfile: Found at the project root (
Dockerfile). Uses an Extractor Pattern (deps→builder→runner). The.gitandnode_modulesfolders must be explicitly untracked to prevent cache overlap. - Compose: Local multi-container emulation is handled via
docker-compose.yml.
Reference
- Standalone Config:
next.config.ts(setsoutput: "standalone"). - Prisma Export:
prisma.config.tsensures no CLI wrappers are invoked inside the standalone container, preventing fatalMODULE_NOT_FOUNDruntime crashes. - Docker Mounts:
- Main App: PostgreSQL data volume (if running in-cluster)
- Data Engine: PostgreSQL data volume (if running in-cluster)
- Cache:
/data(Redis)