coolify: [Bug]: Twenty service not working

Error Message and Logs


2024-12-10T19:01:52.405968274Z query: SELECT * FROM current_schema()
2024-12-10T19:01:53.043376479Z query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2024-12-10T19:01:53.044221939Z query: SELECT version();
2024-12-10T19:01:53.049298802Z query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'metadata' AND "table_name" = '_typeorm_migrations'
2024-12-10T19:01:53.055694038Z query: SELECT * FROM "metadata"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
2024-12-10T19:01:53.057858633Z No migrations are pending
2024-12-10T19:01:53.980766241Z query: SELECT * FROM current_schema()
2024-12-10T19:01:54.810115004Z query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2024-12-10T19:01:54.810802579Z query: SELECT version();
2024-12-10T19:01:54.813869119Z query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'core' AND "table_name" = '_typeorm_migrations'
2024-12-10T19:01:54.819055225Z query: SELECT * FROM "core"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
2024-12-10T19:01:54.820834977Z No migrations are pending
2024-12-10T19:01:54.987916739Z Successfuly migrated DB!
2024-12-10T19:01:54.988351447Z touch: /app/docker-data/db_status: No such file or directory
2024-12-10T19:01:59.890586072Z Running database setup and migrations...
2024-12-10T19:02:00.823401951Z query failed: CREATE EXTENSION IF NOT EXISTS "vector"
2024-12-10T19:02:00.823420674Z error: error: extension "vector" is not available
2024-12-10T19:02:00.857324674Z Failed to perform 'create extension "vector (pgvector)"': QueryFailedError: extension "vector" is not available
2024-12-10T19:02:00.857933340Z Performed 'create schema "public"' successfully
2024-12-10T19:02:00.858354044Z Performed 'create schema "metadata"' successfully
2024-12-10T19:02:00.858630699Z Performed 'create schema "core"' successfully
2024-12-10T19:02:00.859040206Z Performed 'create extension "uuid-ossp"' successfully
2024-12-10T19:02:00.859309816Z Performed 'create extension "postgres_fdw"' successfully
2024-12-10T19:02:00.859928857Z Performed 'create extension "wrappers"' successfully
2024-12-10T19:02:00.860363024Z Performed 'create extension "mysql_fdw"' successfully
2024-12-10T19:02:00.863756396Z query failed: 
2024-12-10T19:02:00.863770016Z           CREATE FOREIGN DATA WRAPPER "airtable_fdw"
2024-12-10T19:02:00.863773905Z           HANDLER "airtable_fdw_handler"
2024-12-10T19:02:00.863776579Z           VALIDATOR "airtable_fdw_validator";
2024-12-10T19:02:00.863778966Z           
2024-12-10T19:02:00.863786003Z error: error: foreign-data wrapper "airtable_fdw" already exists
2024-12-10T19:02:00.897383897Z Performed 'create airtable "wrappers"' successfully
2024-12-10T19:02:00.899671758Z query failed: 
2024-12-10T19:02:00.899682460Z           CREATE FOREIGN DATA WRAPPER "bigquery_fdw"
2024-12-10T19:02:00.899685869Z           HANDLER "big_query_fdw_handler"
2024-12-10T19:02:00.899688602Z           VALIDATOR "big_query_fdw_validator";
2024-12-10T19:02:00.899691403Z           
2024-12-10T19:02:00.899708046Z error: error: foreign-data wrapper "bigquery_fdw" already exists
2024-12-10T19:02:00.917175723Z Performed 'create bigQuery "wrappers"' successfully
2024-12-10T19:02:00.919639814Z query failed: 
2024-12-10T19:02:00.919650715Z           CREATE FOREIGN DATA WRAPPER "clickhouse_fdw"
2024-12-10T19:02:00.919653348Z           HANDLER "click_house_fdw_handler"
2024-12-10T19:02:00.919655576Z           VALIDATOR "click_house_fdw_validator";
2024-12-10T19:02:00.919657735Z           
2024-12-10T19:02:00.919659887Z error: error: foreign-data wrapper "clickhouse_fdw" already exists
2024-12-10T19:02:00.926595576Z Performed 'create clickHouse "wrappers"' successfully
2024-12-10T19:02:00.929312105Z query failed: 
2024-12-10T19:02:00.929327621Z           CREATE FOREIGN DATA WRAPPER "firebase_fdw"
2024-12-10T19:02:00.929331213Z           HANDLER "firebase_fdw_handler"
2024-12-10T19:02:00.929334073Z           VALIDATOR "firebase_fdw_validator";
2024-12-10T19:02:00.929336883Z           
2024-12-10T19:02:00.929342491Z error: error: foreign-data wrapper "firebase_fdw" already exists
2024-12-10T19:02:00.937867623Z Performed 'create firebase "wrappers"' successfully
2024-12-10T19:02:00.940317808Z query failed: 
2024-12-10T19:02:00.940335773Z           CREATE FOREIGN DATA WRAPPER "logflare_fdw"
2024-12-10T19:02:00.940338738Z           HANDLER "logflare_fdw_handler"
2024-12-10T19:02:00.940341015Z           VALIDATOR "logflare_fdw_validator";
2024-12-10T19:02:00.940344936Z           
2024-12-10T19:02:00.940347051Z error: error: foreign-data wrapper "logflare_fdw" already exists
2024-12-10T19:02:00.947360341Z Performed 'create logflare "wrappers"' successfully
2024-12-10T19:02:00.949171281Z query failed: 
2024-12-10T19:02:00.949182361Z           CREATE FOREIGN DATA WRAPPER "s3_fdw"
2024-12-10T19:02:00.949185965Z           HANDLER "s3_fdw_handler"
2024-12-10T19:02:00.949214357Z           VALIDATOR "s3_fdw_validator";
2024-12-10T19:02:00.949217176Z           
2024-12-10T19:02:00.949232187Z error: error: foreign-data wrapper "s3_fdw" already exists
2024-12-10T19:02:00.956258542Z Performed 'create s3 "wrappers"' successfully
2024-12-10T19:02:00.959409477Z query failed: 
2024-12-10T19:02:00.959423767Z           CREATE FOREIGN DATA WRAPPER "stripe_fdw"
2024-12-10T19:02:00.959426754Z           HANDLER "stripe_fdw_handler"
2024-12-10T19:02:00.959430232Z           VALIDATOR "stripe_fdw_validator";
2024-12-10T19:02:00.959433010Z           
2024-12-10T19:02:00.959436319Z error: error: foreign-data wrapper "stripe_fdw" already exists
2024-12-10T19:02:00.967558736Z Performed 'create stripe "wrappers"' successfully
2024-12-10T19:02:12.867229637Z query: SELECT * FROM current_schema()
2024-12-10T19:02:13.485630294Z query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2024-12-10T19:02:13.486624926Z query: SELECT version();
2024-12-10T19:02:13.491333151Z query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'metadata' AND "table_name" = '_typeorm_migrations'
2024-12-10T19:02:13.499144079Z query: SELECT * FROM "metadata"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
2024-12-10T19:02:13.501530496Z No migrations are pending
2024-12-10T19:02:14.425758552Z query: SELECT * FROM current_schema()
2024-12-10T19:02:15.300863622Z query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
2024-12-10T19:02:15.301754786Z query: SELECT version();
2024-12-10T19:02:15.304980610Z query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'core' AND "table_name" = '_typeorm_migrations'
2024-12-10T19:02:15.310303333Z query: SELECT * FROM "core"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
2024-12-10T19:02:15.311836859Z No migrations are pending
2024-12-10T19:02:15.525179807Z Successfuly migrated DB!
2024-12-10T19:02:15.525685818Z touch: /app/docker-data/db_status: No such file or directory
2024-12-10T19:02:20.373296883Z Running database setup and migrations...
2024-12-10T19:02:21.249410226Z query failed: CREATE EXTENSION IF NOT EXISTS "vector"
2024-12-10T19:02:21.249427729Z error: error: extension "vector" is not available
2024-12-10T19:02:21.278862965Z Failed to perform 'create extension "vector (pgvector)"': QueryFailedError: extension "vector" is not available
2024-12-10T19:02:21.279476248Z Performed 'create schema "public"' successfully
2024-12-10T19:02:21.280035169Z Performed 'create schema "metadata"' successfully
2024-12-10T19:02:21.280338993Z Performed 'create schema "core"' successfully
2024-12-10T19:02:21.280849791Z Performed 'create extension "uuid-ossp"' successfully
2024-12-10T19:02:21.281361367Z Performed 'create extension "postgres_fdw"' successfully
2024-12-10T19:02:21.281923440Z Performed 'create extension "wrappers"' successfully
2024-12-10T19:02:21.282660594Z Performed 'create extension "mysql_fdw"' successfully
2024-12-10T19:02:21.286635954Z query failed: 
2024-12-10T19:02:21.286650338Z           CREATE FOREIGN DATA WRAPPER "airtable_fdw"
2024-12-10T19:02:21.286652664Z           HANDLER "airtable_fdw_handler"
2024-12-10T19:02:21.286654569Z           VALIDATOR "airtable_fdw_validator";
2024-12-10T19:02:21.286656598Z           
2024-12-10T19:02:21.286676001Z error: error: foreign-data wrapper "airtable_fdw" already exists
2024-12-10T19:02:21.315641152Z Performed 'create airtable "wrappers"' successfully
2024-12-10T19:02:21.318821127Z query failed: 
2024-12-10T19:02:21.318840080Z           CREATE FOREIGN DATA WRAPPER "bigquery_fdw"
2024-12-10T19:02:21.318844186Z           HANDLER "big_query_fdw_handler"
2024-12-10T19:02:21.318847366Z           VALIDATOR "big_query_fdw_validator";
2024-12-10T19:02:21.318851002Z           
2024-12-10T19:02:21.318854136Z error: error: foreign-data wrapper "bigquery_fdw" already exists
2024-12-10T19:02:21.337067666Z Performed 'create bigQuery "wrappers"' successfully
2024-12-10T19:02:21.339129768Z query failed: 
2024-12-10T19:02:21.339143937Z           CREATE FOREIGN DATA WRAPPER "clickhouse_fdw"
2024-12-10T19:02:21.339147408Z           HANDLER "click_house_fdw_handler"
2024-12-10T19:02:21.339150206Z           VALIDATOR "click_house_fdw_validator";
2024-12-10T19:02:21.339152865Z           
2024-12-10T19:02:21.339155395Z error: error: foreign-data wrapper "clickhouse_fdw" already exists
2024-12-10T19:02:21.344641019Z Performed 'create clickHouse "wrappers"' successfully
2024-12-10T19:02:21.346428775Z query failed: 
2024-12-10T19:02:21.346441927Z           CREATE FOREIGN DATA WRAPPER "firebase_fdw"
2024-12-10T19:02:21.346445003Z           HANDLER "firebase_fdw_handler"
2024-12-10T19:02:21.346447805Z           VALIDATOR "firebase_fdw_validator";
2024-12-10T19:02:21.346460377Z           
2024-12-10T19:02:21.346466117Z error: error: foreign-data wrapper "firebase_fdw" already exists
2024-12-10T19:02:21.352040306Z Performed 'create firebase "wrappers"' successfully
2024-12-10T19:02:21.354214617Z query failed: 
2024-12-10T19:02:21.354227750Z           CREATE FOREIGN DATA WRAPPER "logflare_fdw"
2024-12-10T19:02:21.354231761Z           HANDLER "logflare_fdw_handler"
2024-12-10T19:02:21.354234453Z           VALIDATOR "logflare_fdw_validator";
2024-12-10T19:02:21.354237130Z           
2024-12-10T19:02:21.354240591Z error: error: foreign-data wrapper "logflare_fdw" already exists
2024-12-10T19:02:21.358442975Z Performed 'create logflare "wrappers"' successfully
2024-12-10T19:02:21.359833861Z query failed: 
2024-12-10T19:02:21.359843955Z           CREATE FOREIGN DATA WRAPPER "s3_fdw"
2024-12-10T19:02:21.359847165Z           HANDLER "s3_fdw_handler"
2024-12-10T19:02:21.359849859Z           VALIDATOR "s3_fdw_validator";
2024-12-10T19:02:21.359852498Z           
2024-12-10T19:02:21.359855033Z error: error: foreign-data wrapper "s3_fdw" already exists
2024-12-10T19:02:21.365146225Z Performed 'create s3 "wrappers"' successfully
2024-12-10T19:02:21.367391421Z query failed: 
2024-12-10T19:02:21.367403716Z           CREATE FOREIGN DATA WRAPPER "stripe_fdw"
2024-12-10T19:02:21.367407054Z           HANDLER "stripe_fdw_handler"
2024-12-10T19:02:21.367409688Z           VALIDATOR "stripe_fdw_validator";
2024-12-10T19:02:21.367412025Z           
2024-12-10T19:02:21.367414314Z error: error: foreign-data wrapper "stripe_fdw" already exists
2024-12-10T19:02:21.373372455Z Performed 'create stripe "wrappers"' successfully

Steps to Reproduce

  1. install Coolify
  2. setup the basics
  3. select the Twenty service
  4. try to run the app with the link provided and check the logs

Example Repository URL

No response

Coolify Version

v4.0.0-beta.376

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.10

Additional Information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 3
  • Comments: 22 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I gave it a shot to convert the docker-compose.yml file Twenty has on their github to fit the Coolify’s service format. I haven’t poked the deployment from all angles yet, but I managed to get Twenty running on Coolify with the following docker compose file.

I’m no Docker expert, so if anyone can spot any mistakes, pls let me know.

https://gist.github.com/kuldar/1cdfb6a5cded1109c60ba521bd139b51

# documentation: https://twenty.com/developers/section/self-hosting/docker-compose
# slogan: Twenty is a CRM designed to fit your unique business needs.
# tags: crm, self-hosted, dashboard
# logo: svgs/twenty.svg
# port: 3000

services:
  change-vol-ownership:
    image: ubuntu
    user: root
    restart: "no"
    exclude_from_hc: true
    volumes:
      - server-local-data:/tmp/server-local-data
      - docker-data:/tmp/docker-data
    command: >
      bash -c "
      chown -R 1000:1000 /tmp/server-local-data &&
      chown -R 1000:1000 /tmp/docker-data &&
      echo 'Volume ownership changed successfully'"

  server:
    image: twentycrm/twenty:${TWENTY_VERSION:-latest}
    volumes:
      - server-local-data:/app/packages/twenty-server/.local-storage
      - docker-data:/app/docker-data
    environment:
      - SERVICE_FQDN_SERVER_3000
      - NODE_PORT=3000
      - PG_DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@db:5432/default
      - FRONTEND_URL=$SERVICE_FQDN_SERVER
      - SERVER_URL=$SERVICE_FQDN_SERVER
      - REDIS_URL=redis://redis:6379
      
      # Required setting for successful startup
      - SIGN_IN_PREFILLED=true
      
      # Storage configuration
      - STORAGE_TYPE=${STORAGE_TYPE:-local}
      - STORAGE_S3_REGION=${STORAGE_S3_REGION}
      - STORAGE_S3_NAME=${STORAGE_S3_NAME}
      - STORAGE_S3_ENDPOINT=${STORAGE_S3_ENDPOINT}
      
      # Security
      - APP_SECRET=$SERVICE_BASE64_32_SECRET

    depends_on:
      change-vol-ownership:
        condition: service_completed_successfully
      db:
        condition: service_healthy
    healthcheck:
      test: curl --fail http://localhost:3000/healthz || exit 1
      interval: 10s
      timeout: 5s
      retries: 30
      start_period: 40s

  worker:
    image: twentycrm/twenty:${TWENTY_VERSION:-latest}
    command: ["yarn", "worker:prod"]
    volumes:
      - server-local-data:/app/packages/twenty-server/.local-storage
      - docker-data:/app/docker-data
    environment:
      - PG_DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@db:5432/default
      - SERVER_URL=$SERVICE_FQDN_SERVER
      - REDIS_URL=redis://redis:6379
      - DISABLE_DB_MIGRATIONS=true
      
      # Storage configuration
      - STORAGE_TYPE=${STORAGE_TYPE:-local}
      - STORAGE_S3_REGION=${STORAGE_S3_REGION}
      - STORAGE_S3_NAME=${STORAGE_S3_NAME}
      - STORAGE_S3_ENDPOINT=${STORAGE_S3_ENDPOINT}
      
      # Security
      - APP_SECRET=$SERVICE_BASE64_32_SECRET

    depends_on:
      db:
        condition: service_healthy
      server:
        condition: service_healthy

  db:
    image: postgres:16
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
    healthcheck:
      test: pg_isready -U postgres -h localhost -d default
      interval: 5s
      timeout: 5s
      retries: 10

  redis:
    image: redis
    volumes:
      - redis-data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  db-data:
  redis-data:
  server-local-data:
  docker-data:

Hi @peaklabs-dev, any avances on this? Thanks!!

Twenty Service with this Docker Compose configuration (https://github.com/coollabsio/coolify/issues/4538#issuecomment-2552237221) is degradated.