Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Twenty service not working #4538

Open
vinyll opened this issue Dec 10, 2024 · 11 comments
Open

[Bug]: Twenty service not working #4538

vinyll opened this issue Dec 10, 2024 · 11 comments
Labels
🐞 Confirmed Bug Verified issues that have been reproduced by the team.

Comments

@vinyll
Copy link

vinyll commented Dec 10, 2024

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

@vinyll vinyll added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Dec 10, 2024
@vinyll vinyll changed the title [Bug]: Installing the default Twenty sevice on a fresh server crashes [Bug]: Installing the default Twenty service on a fresh server crashes Dec 10, 2024
@JuanxCursed
Copy link
Contributor

There is some changes on the postgres database that are needed for the latest version (v0.33.0+), check the original twenty docker file:
https://raw.githubusercontent.com/twentyhq/twenty/refs/tags/v0.33.0/packages/twenty-docker/docker-compose.yml

Take a closer look to the postgres image, volume and variable environments

@peaklabs-dev peaklabs-dev changed the title [Bug]: Installing the default Twenty service on a fresh server crashes [Bug]: Twenty service not working Dec 13, 2024
@peaklabs-dev peaklabs-dev added 🐞 Confirmed Bug Verified issues that have been reproduced by the team. and removed 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Dec 13, 2024
@peaklabs-dev peaklabs-dev added this to the v4.0.0 Stable Release milestone Dec 13, 2024
@peaklabs-dev
Copy link
Member

Also, there is a new worker container that was recently added that we need to add.

@Sufyang737
Copy link

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

@occult
Copy link

occult commented Dec 18, 2024

This docker compose works with static values. Probably helpful before the actual template is updated :) @peaklabs-dev

services:
  change-vol-ownership:
    image: ubuntu
    user: root
    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"
  twenty:
    image: 'twentycrm/twenty:latest'
    volumes:
      - 'server-local-data:/app/packages/twenty-server/local-storage'
      - 'docker-data:/app/docker-data'
    environment:
      - SERVICE_FQDN_TWENTY_3000
      - SERVER_URL=$SERVICE_FQDN_TWENTY
      - FRONT_BASE_URL=$SERVICE_FQDN_TWENTY
      - ENABLE_DB_MIGRATIONS=true
      - 'CACHE_STORAGE_TYPE=${CACHE_STORAGE_TYPE:-redis}'
      - 'REDIS_URL=redis://redis:6379'
      - 'API_RATE_LIMITING_TTL=${API_RATE_LIMITING_TTL:-100}'
      - 'API_RATE_LIMITING_LIMIT=${API_RATE_LIMITING_LIMIT:-100}'
      - APP_SECRET=$SERVICE_BASE64_32_SECRET
      - POSTGRES_ADMIN_PASSWORD=twenty
      - 'PG_DATABASE_URL=postgres://postgres:twenty@postgres:5432/default'
      - 'IS_SIGN_UP_DISABLED=${IS_SIGN_UP_DISABLED:-false}'
      - 'PASSWORD_RESET_TOKEN_EXPIRES_IN=${PASSWORD_RESET_TOKEN_EXPIRES_IN:-5m}'
      - WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION=$WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION
      - WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION=$WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION
      - 'STORAGE_TYPE=${STORAGE_TYPE:-local}'
      - STORAGE_S3_REGION=$STORAGE_S3_REGION
      - STORAGE_S3_NAME=$STORAGE_S3_NAME
      - STORAGE_S3_ENDPOINT=$STORAGE_S3_ENDPOINT
      - STORAGE_S3_ACCESS_KEY_ID=$STORAGE_S3_ACCESS_KEY_ID
      - STORAGE_S3_SECRET_ACCESS_KEY=$STORAGE_S3_SECRET_ACCESS_KEY
      - 'MESSAGE_QUEUE_TYPE=${MESSAGE_QUEUE_TYPE:-pg-boss}'
      - EMAIL_FROM_ADDRESS=$EMAIL_FROM_ADDRESS
      - EMAIL_FROM_NAME=$EMAIL_FROM_NAME
      - EMAIL_SYSTEM_ADDRESS=$EMAIL_SYSTEM_ADDRESS
      - 'EMAIL_DRIVER=${EMAIL_DRIVER:-logger}'
      - EMAIL_SMTP_HOST=$EMAIL_SMTP_HOST
      - EMAIL_SMTP_PORT=$EMAIL_SMTP_PORT
      - EMAIL_SMTP_USER=$EMAIL_SMTP_USER
      - EMAIL_SMTP_PASSWORD=$EMAIL_SMTP_PASSWORD
      - SIGN_IN_PREFILLED=false
      - 'DEBUG_MODE=${DEBUG_MODE:-false}'
      - 'TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-false}'
    depends_on:
      postgres:
        condition: service_healthy
    healthcheck:
      test:
        - CMD
        - curl
        - '-f'
        - 'http://127.0.0.1:3000/healthz'
      interval: 2s
      timeout: 10s
      retries: 15
  worker:
    image: 'twentycrm/twenty:latest'
    command:
      - yarn
      - 'worker:prod'
    environment:
      - 'PG_DATABASE_URL=postgres://postgres:twenty@postgres:5432/default'
      - SERVER_URL=$SERVICE_FQDN_TWENTY
      - FRONT_BASE_URL=$SERVICE_FQDN_TWENTY
      - 'REDIS_URL=redis://redis:6379'
      - ENABLE_DB_MIGRATIONS=false
      - 'STORAGE_TYPE=${STORAGE_TYPE:-local}'
      - STORAGE_S3_REGION=$STORAGE_S3_REGION
      - STORAGE_S3_NAME=$STORAGE_S3_NAME
      - STORAGE_S3_ENDPOINT=$STORAGE_S3_ENDPOINT
      - APP_SECRET=$SERVICE_BASE64_32_SECRET
    depends_on:
      postgres:
        condition: service_healthy
      twenty:
        condition: service_healthy
    restart: always
  postgres:
    image: 'twentycrm/twenty-postgres-spilo:latest'
    environment:
      - PGUSER_SUPERUSER=postgres
      - PGPASSWORD_SUPERUSER=twenty
      - ALLOW_NOSSL=true
      - SPILO_PROVIDER=local
    volumes:
      - 'pg-data:/home/postgres/pgdata'
    healthcheck:
      test: 'pg_isready -U postgres -h localhost -d postgres'
      interval: 5s
      timeout: 5s
      retries: 10
  redis:
    image: 'redis:latest'
    volumes:
      - 'redis-data:/data'
    healthcheck:
      test:
        - CMD
        - redis-cli
        - ping
      interval: 5s
      timeout: 20s
      retries: 10

@occult
Copy link

occult commented Dec 18, 2024

@peaklabs-dev is there a reason why docker tags aren't fixed? this would prevent this bug and would open another issue for updating the service

@Sufyang737
Copy link

Hiii @occult good day! Mine still isn't working! I try testing the API KEY from the same Twenty, and it doesn't work! Is it working perfectly for you?

@vinyll
Copy link
Author

vinyll commented Dec 19, 2024

I copy pasted the docker file provided and recreated the entire thing.
Twenty is now running

@Sufyang737
Copy link

Sufyang737 commented Dec 21, 2024

Hi @vinyll Can you tell me how you have configured the twenty?
Thanks

@vinyll
Copy link
Author

vinyll commented Dec 25, 2024

I've changed the docker compose according to @occult's comment, saved and re-deployed.
I still struggle in general with SSL on Coolify as I don't get how it is supposed to work but Twenty itself just runs.

@albertorizzi
Copy link
Contributor

Twenty Service with this Docker Compose configuration (#4538 (comment)) is degradated.

@nathanialhenniges
Copy link
Contributor

services:
  change-vol-ownership:
    image: ubuntu
    user: root
    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"
  twenty:
    image: 'twentycrm/twenty:latest'
    volumes:
      - 'server-local-data:/app/packages/twenty-server/local-storage'
      - 'docker-data:/app/docker-data'
    environment:
      - SERVICE_FQDN_TWENTY_3000
      - SERVER_URL=$SERVICE_FQDN_TWENTY
      - FRONT_BASE_URL=$SERVICE_FQDN_TWENTY
      - ENABLE_DB_MIGRATIONS=true
      - 'CACHE_STORAGE_TYPE=${CACHE_STORAGE_TYPE:-redis}'
      - 'REDIS_URL=redis://redis:6379'
      - 'API_RATE_LIMITING_TTL=${API_RATE_LIMITING_TTL:-100}'
      - 'API_RATE_LIMITING_LIMIT=${API_RATE_LIMITING_LIMIT:-100}'
      - APP_SECRET=$SERVICE_BASE64_32_SECRET
      - POSTGRES_ADMIN_PASSWORD=twenty
      - 'PG_DATABASE_URL=postgres://postgres:twenty@postgres:5432/default'
      - 'IS_SIGN_UP_DISABLED=${IS_SIGN_UP_DISABLED:-false}'
      - 'PASSWORD_RESET_TOKEN_EXPIRES_IN=${PASSWORD_RESET_TOKEN_EXPIRES_IN:-5m}'
      - WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION=$WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION
      - WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION=$WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION
      - 'STORAGE_TYPE=${STORAGE_TYPE:-local}'
      - STORAGE_S3_REGION=$STORAGE_S3_REGION
      - STORAGE_S3_NAME=$STORAGE_S3_NAME
      - STORAGE_S3_ENDPOINT=$STORAGE_S3_ENDPOINT
      - STORAGE_S3_ACCESS_KEY_ID=$STORAGE_S3_ACCESS_KEY_ID
      - STORAGE_S3_SECRET_ACCESS_KEY=$STORAGE_S3_SECRET_ACCESS_KEY
      - 'MESSAGE_QUEUE_TYPE=${MESSAGE_QUEUE_TYPE:-pg-boss}'
      - EMAIL_FROM_ADDRESS=$EMAIL_FROM_ADDRESS
      - EMAIL_FROM_NAME=$EMAIL_FROM_NAME
      - EMAIL_SYSTEM_ADDRESS=$EMAIL_SYSTEM_ADDRESS
      - 'EMAIL_DRIVER=${EMAIL_DRIVER:-logger}'
      - EMAIL_SMTP_HOST=$EMAIL_SMTP_HOST
      - EMAIL_SMTP_PORT=$EMAIL_SMTP_PORT
      - EMAIL_SMTP_USER=$EMAIL_SMTP_USER
      - EMAIL_SMTP_PASSWORD=$EMAIL_SMTP_PASSWORD
      - SIGN_IN_PREFILLED=false
      - 'DEBUG_MODE=${DEBUG_MODE:-false}'
      - 'TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-false}'
    depends_on:
      postgres:
        condition: service_healthy
    healthcheck:
      test:
        - CMD
        - curl
        - '-f'
        - 'http://127.0.0.1:3000/health'
      interval: 2s
      timeout: 10s
      retries: 15
  worker:
    image: 'twentycrm/twenty:latest'
    command:
      - yarn
      - 'worker:prod'
    environment:
      - 'PG_DATABASE_URL=postgres://postgres:twenty@postgres:5432/default'
      - SERVER_URL=$SERVICE_FQDN_TWENTY
      - FRONT_BASE_URL=$SERVICE_FQDN_TWENTY
      - 'REDIS_URL=redis://redis:6379'
      - ENABLE_DB_MIGRATIONS=false
      - 'STORAGE_TYPE=${STORAGE_TYPE:-local}'
      - STORAGE_S3_REGION=$STORAGE_S3_REGION
      - STORAGE_S3_NAME=$STORAGE_S3_NAME
      - STORAGE_S3_ENDPOINT=$STORAGE_S3_ENDPOINT
      - APP_SECRET=$SERVICE_BASE64_32_SECRET
    depends_on:
      postgres:
        condition: service_healthy
      twenty:
        condition: service_healthy
    restart: always
    healthcheck:
      test:
        - CMD
        - sh
        - -c
        - "ps aux | grep '[w]orker:prod' || exit 1"  # Check if the worker process is running
      interval: 10s
      timeout: 5s
      retries: 5
  postgres:
    image: 'twentycrm/twenty-postgres-spilo:latest'
    environment:
      - PGUSER_SUPERUSER=postgres
      - PGPASSWORD_SUPERUSER=twenty
      - ALLOW_NOSSL=true
      - SPILO_PROVIDER=local
    volumes:
      - 'pg-data:/home/postgres/pgdata'
    healthcheck:
      test: 'pg_isready -U postgres -h localhost -d postgres'
      interval: 5s
      timeout: 5s
      retries: 10
  redis:
    image: 'redis:latest'
    volumes:
      - 'redis-data:/data'
    healthcheck:
      test:
        - CMD
        - redis-cli
        - ping
      interval: 5s
      timeout: 20s
      retries: 10

What can do is remove the

  change-vol-ownership:
    image: ubuntu
    user: root
    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"

Once you run the container setup and it will all be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Confirmed Bug Verified issues that have been reproduced by the team.
Projects
None yet
Development

No branches or pull requests

8 participants
@vinyll @occult @JuanxCursed @nathanialhenniges @albertorizzi @Sufyang737 @peaklabs-dev and others