* fix(migrations): use HINDSIGHT_API_MIGRATION_DATABASE_URL when set Session-level advisory locks are broken when the database URL goes through PgBouncer in transaction mode: the backend connection is returned to the pool on COMMIT, orphaning the lock, so multiple pods can simultaneously run migrations for the same schema. When HINDSIGHT_API_MIGRATION_DATABASE_URL is set, use it for both the advisory lock connection and the Alembic run. Callers should point this at the direct PostgreSQL endpoint (bypassing the pooler) so the session-level lock is held for the full migration duration. * refactor(migrations): move MIGRATION_DATABASE_URL to standard config Wire HINDSIGHT_API_MIGRATION_DATABASE_URL through HindsightConfig instead of reading os.getenv() directly in migrations.py. Add the field to the dataclass, from_env(), log_config(), all call sites, .env.example, and the configuration docs page. * fix: update test mocks for migration_database_url kwarg and regenerate docs skill --------- Co-authored-by: Nicolò Boschi <boschi1997@gmail.com> |
||
|---|---|---|
| .. | ||
| blog | ||
| docs | ||
| examples | ||
| scripts | ||
| src | ||
| static | ||
| versioned_docs | ||
| versioned_sidebars | ||
| .gitignore | ||
| docusaurus.config.ts | ||
| package.json | ||
| README.md | ||
| sidebars.ts | ||
| tsconfig.json | ||
| versions.json | ||
Website
This website is built using Docusaurus, a modern static website generator.
Installation
npm install
Local Development
npm start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
npm run build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
Using SSH:
USE_SSH=true npm run deploy
Not using SSH:
GIT_USER=<Your GitHub username> npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.