Compare commits

..

2 Commits

Author SHA1 Message Date
666a14806e fix(infra): install pgvector and uuid-ossp extensions in mosaic-db-init
Mosaic Stack API schema requires both vector (pgvector) and uuid-ossp
extensions. The mosaic user cannot CREATE EXTENSION (requires superuser),
so extensions must be installed by the admin user during db-init before
Prisma runs migrations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 21:55:07 -06:00
a8d426e3c0 infra: migrate postgres to shared openbrain_brain-db (#664)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-03-03 03:45:46 +00:00

View File

@@ -91,6 +91,10 @@ services:
psql -h openbrain_brain-db -U $${PGUSER} -tc "SELECT 1 FROM pg_database WHERE datname='$${MOSAIC_DB}'" | grep -q 1 || \
psql -h openbrain_brain-db -U $${PGUSER} -c "CREATE DATABASE $${MOSAIC_DB} OWNER $${MOSAIC_USER} ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' TEMPLATE template0;"
echo "Enabling required extensions in $${MOSAIC_DB}..."
psql -h openbrain_brain-db -U $${PGUSER} -d $${MOSAIC_DB} -c "CREATE EXTENSION IF NOT EXISTS vector;"
psql -h openbrain_brain-db -U $${PGUSER} -d $${MOSAIC_DB} -c "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";"
echo "Mosaic database ready: $${MOSAIC_DB}"
networks:
- openbrain-brain-internal