2.5 KiB
Self-Hosted Installability
GovOPlaN uses a staged self-hosted installability path.
Packaging Decision
The early packaging approach is a staged combination:
- Generate an explicit environment template and validate it before startup.
- Use a Compose-backed production-like development profile for local rehearsal.
- Use the deployment operator guide as the runbook for migrations, workers, backups, health checks, and module installer rollback drills.
- Use the module installer CLI/daemon for package mutation once the runtime is already installed and under maintenance mode.
This keeps first installation understandable while still preserving the later goal of install/update/uninstall through signed catalogs and the installer daemon. The API server must not run package managers from request handlers.
Config Bootstrap
Generate a self-hosted template:
cd /mnt/DATA/git/govoplan
./.venv/bin/python -m govoplan_core.commands.config env-template \
--profile self-hosted \
--generate-secrets \
--output .env.self-hosted
Validate the current shell environment:
set -a
. .env.self-hosted
set +a
./.venv/bin/python -m govoplan_core.commands.config validate --profile self-hosted
The command reports all known blockers at once. Production-like/self-hosted
profiles require explicit APP_ENV, DATABASE_URL, MASTER_KEY_B64,
ENABLED_MODULES, and CORS_ORIGINS. Production rejects SQLite, development
bootstrap, insecure auth cookies, and unsigned catalog trust roots when a
catalog source is configured.
Production-Like Dev Stack
Use the local production-like wrapper for repeatable rehearsal:
cd /mnt/DATA/git/govoplan
tools/launch/production-like-dev.sh validate-config
tools/launch/production-like-dev.sh seed
tools/launch/production-like-dev.sh start
Stop Docker dependencies:
tools/launch/production-like-dev.sh stop
Reset all profile data:
tools/launch/production-like-dev.sh reset --yes
The start command delegates to tools/launch/launch-production-like-dev.sh, which
runs API, worker, and WebUI in the foreground. Stop those processes with
Ctrl+C in the launcher terminal.
Module Boundary Gate
govoplan/tools/checks/check_dependency_boundaries.py is part of the focused verification
path. It checks backend imports and WebUI package/source imports so modules do
not grow hidden runtime dependencies on each other. Feature modules should
integrate through core capabilities, backend APIs/events, route contributions,
or explicit UI extension points.