From 097ca209bc4cbc607440e83a47c2788c6aaa4d57 Mon Sep 17 00:00:00 2001 From: Toby Brancher Date: Sun, 21 Jul 2024 23:39:22 +0100 Subject: [PATCH] Support map fields in Directus To support the map fields in Directus with Postgres you need the Postgis extension installed, with docker we can just change the image to use the equivalent alpine postgis image, source latest stable alpine from here (perhaps there is a better ref to use than one with a specific version number?): https://registry.hub.docker.com/r/postgis/postgis/ If you are already running Directus without postgis, and would like to make use of the mapping fields after updating the docker compose file you will need to go to `execute command`, select the postgres container and run the following command filling in the appropriate env vars; `psql -U ${SERVICE_USER_POSTGRESQL} -d ${POSTGRESQL_DATABASE} -c "CREATE EXTENSION postgis;"` --- templates/compose/directus-with-postgresql.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/compose/directus-with-postgresql.yaml b/templates/compose/directus-with-postgresql.yaml index e7dd60921..e97c77af0 100644 --- a/templates/compose/directus-with-postgresql.yaml +++ b/templates/compose/directus-with-postgresql.yaml @@ -36,7 +36,7 @@ services: redis: condition: service_healthy postgresql: - image: postgres:16-alpine + image: postgis/postgis:16-3.4-alpine volumes: - directus-postgresql-data:/var/lib/postgresql/data environment: