coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.67k stars 1.89k forks source link

[Bug]: Directus installs require PostGis for map fields #2877

Open Loque- opened 4 months ago

Loque- commented 4 months ago

Description

If you install Directus following the Coolify one-click install you will currently run into this issue if you try and create a map field within a data model. I found this linked issue that implies the setup script needs to add postgis in order to support this map field: https://github.com/directus/directus/issues/22691

Compose script for Directus is here: https://github.com/coollabsio/coolify/blob/main/templates/compose/directus-with-postgresql.yaml

Minimal Reproduction (if possible, example repository)

Exception or Error

The Directus error produced when trying to create a map field loos like this;

{
  "errors": [
    {
      "message": {
        "length": 95,
        "name": "error",
        "severity": "ERROR",
        "code": "42704",
        "position": "40",
        "file": "parse_type.c",
        "line": "270",
        "routine": "typenameType"
      },
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR"
      }
    }
  ]
}

Version

4.0.0 beta 3.1.5

ismailsoftdev commented 3 months ago

I am also working on a project that requires postgis extension on the PostgreSQL db I am using. I'd love to get guides (if there are any) on enabling the extension.

I have tried running this command into the execute command: psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -c "CREATE EXTENSION postgis;"

I have selected the db container and executed the command, then I got this error:

ERROR:  extension "postgis" is not available 
DETAIL:  Could not open extension control file "/usr/local/share/postgresql/extension/postgis.control": No such file or directory.
HINT:  The extension must first be installed on the system where PostgreSQL is running.

I am now asking myself, how can I install the postgis extension before enabling it?