Helper scripts for CrossRef Local database management and deployment.
scripts/
├── database/ # Database maintenance scripts
│ ├── 00_rebuild_all.sh
│ ├── 02_create_missing_indexes.sh
│ ├── 99_db_info.sh
│ ├── 99_maintain_indexes.sh
│ └── 99_switch_to_optimized.sh
└── deployment/ # Container deployment
├── install_apptainer.sh
├── build_apptainer.sh
├── run_apptainer.sh
└── run_docker.sh
Full database rebuild from Crossref Public Data File.
./scripts/database/00_rebuild_all.sh --help
./scripts/database/00_rebuild_all.sh all # Full rebuild (~10-14 days)
./scripts/database/00_rebuild_all.sh fts # Rebuild FTS index onlyCreate missing indexes on citations table.
./scripts/database/02_create_missing_indexes.sh --help
./scripts/database/02_create_missing_indexes.sh # Default database
./scripts/database/02_create_missing_indexes.sh --dry-run # Preview changesDisplay database schema, tables, indices, and row counts.
./scripts/database/99_db_info.sh --help
./scripts/database/99_db_info.sh # Quick summary
./scripts/database/99_db_info.sh --full # Full schema dump
./scripts/database/99_db_info.sh --tables # Tables and counts onlyCheck and create missing database indexes.
./scripts/database/99_maintain_indexes.sh --help
./scripts/database/99_maintain_indexes.sh # Check/create indexes
./scripts/database/99_maintain_indexes.sh --check-only # Only check, don't modifyInstall Apptainer container runtime.
./scripts/deployment/install_apptainer.sh --help
./scripts/deployment/install_apptainer.sh # Install default version
./scripts/deployment/install_apptainer.sh -v 1.2.5 # Specific versionBuild Apptainer/Singularity container image.
./scripts/deployment/build_apptainer.sh --help
./scripts/deployment/build_apptainer.sh # Build with defaults
./scripts/deployment/build_apptainer.sh --force # Force rebuildRun crossref-local with Apptainer container.
./scripts/deployment/run_apptainer.sh --help
./scripts/deployment/run_apptainer.sh # Start API server
./scripts/deployment/run_apptainer.sh search CRISPR # Run search
./scripts/deployment/run_apptainer.sh shell # Interactive shellRun crossref-local with Docker container.
./scripts/deployment/run_docker.sh --help
./scripts/deployment/run_docker.sh # Start API server
./scripts/deployment/run_docker.sh search CRISPR # Run search
./scripts/deployment/run_docker.sh shell # Interactive shellFirst-time setup:
# 1. Check/create indexes (do once, takes hours)
./scripts/database/99_maintain_indexes.sh
# 2. Check database info
./scripts/database/99_db_info.sh
# 3. Run tests
make testLong-running operations:
# Use screen for operations that take hours/days
screen -S rebuild
./scripts/database/00_rebuild_all.sh fts
# Ctrl-A D to detach
screen -r rebuild # Reattach