Files
Jake Barnby b952bf7978 fix: Use custom PostgreSQL image with required extensions (PostGIS, pgvector)
The Postgres adapter in utopia-php/database requires PostGIS, pgvector,
and pg_trgm extensions. The plain postgres:18 image lacked these, causing
"collation utf8_ci_ai does not exist" errors (CREATE EXTENSION failed
before the collation could be created).

Switch to postgres:17 with a custom Dockerfile that installs the required
extensions, matching the approach used by utopia-php/database's own tests.
Also reverts the volume mount to /var/lib/postgresql/data (correct for v17).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 04:25:35 +13:00

12 lines
352 B
Docker

ARG POSTGRES_VERSION=17
FROM postgres:${POSTGRES_VERSION}
ARG POSTGRES_VERSION=17
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-${POSTGRES_VERSION}-postgis-3 \
postgresql-${POSTGRES_VERSION}-postgis-3-scripts \
postgresql-${POSTGRES_VERSION}-pgvector \
&& rm -rf /var/lib/apt/lists/*