Adds `npm run maint:check` (health report) and `npm run maint:reindex` (REINDEX DATABASE + REFRESH COLLATION VERSION + ANALYZE) for post- upgrade maintenance, modelled after Nextcloud's occ maintenance. Documented in README. Also relaxes postgres image from digest pin back to tag-pin (pgvector/pgvector:pg16) — the auto-REINDEX-on-drift check in database.js and the COLLATE "C" protection on critical indexes make the digest pin redundant while blocking ordinary `compose pull` updates.
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
services:
|
|
pediatric-scribe:
|
|
build: .
|
|
image: ped-ai-local:latest
|
|
ports:
|
|
- "127.0.0.1:3552:3000"
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- scribe-logs:/app/data/logs
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
container_name: pediatric-ai-scribe
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
postgres:
|
|
# Tag-pinned. If a newer pg16 image ships a different ICU library, the
|
|
# startup drift check in src/db/database.js auto-REINDEXes and
|
|
# refreshes the collation version. For stricter control, pin by digest.
|
|
image: pgvector/pgvector:pg16
|
|
environment:
|
|
POSTGRES_DB: pedscribe
|
|
POSTGRES_USER: pedscribe
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:?set DB_PASSWORD}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
container_name: pedscribe-db
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U pedscribe"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
pgdata:
|
|
scribe-logs:
|