The Directus service templates were missing CORS configuration, causing
preflight OPTIONS requests to fail when connecting from frontend apps.
Users had to manually edit the compose file to add CORS variables.
Add sensible CORS defaults (enabled with dynamic origin matching) to
both directus.yaml and directus-with-postgresql.yaml templates. All
values are user-overridable via the Coolify UI.
Fixes#5024
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;"`