Yarn not in twenty-Server 0.3.3 (Docker)
I noticed the file size is 112.21 MB for 0.3.3 vs 0.3.2 of 320.31 MB
I noticed this as i usually go into the Twenty-Server container a do the yarn database:reset to get things working. and this time i noticed that and npm wasn't installed
is this suppose to be included or not?
12 Replies
npm is not a must, yarn should be there
on production containers the guideline is to use npx actually
that's a good point though, I think some commands might not be working. We should have a set of commands for production containers (using npx) and some for dev that will use nx for performances / hot reloading
has anything changed with V 0.3.2 containers ?
im consistently getting this when i run yarn database:reset with v0.3.1 & 0.3.2
This use to work all the time before 0.3.3
Failed to perform 'create extension pg_graphql': QueryFailedError: permission denied to create extension "pg_graphql"
Performed 'create extension "uuid-ossp"' successfully
Failed to perform 'create extension "postgres_fdw"': QueryFailedError: permission denied to create extension "postgres_fdw"
Failed to perform 'create extension "wrappers"': QueryFailedError: permission denied for language c
Failed to perform 'create extension "mysql_fdw"': QueryFailedError: permission denied to create extension "mysql_fdw"
Failed to perform 'create airtable "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "airtable_fdw"
Failed to perform 'create bigQuery "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "bigquery_fdw"
Failed to perform 'create clickHouse "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "clickhouse_fdw"
Failed to perform 'create firebase "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "firebase_fdw"
Failed to perform 'create logflare "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "logflare_fdw"
Failed to perform 'create s3 "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "s3_fdw"
Failed to perform 'create stripe "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "stripe_fdw"
Performed 'inflect names for graphql' successfully
Failed to perform 'create function graphql': QueryFailedError: schema "graphql" does not exist
basically, im having issues with 0.3.3 and i wanted to test a few things on 0.3.2 and now i can't get that to run with the docker compose file i've used at least 20 times.
Hi @paulyili, I'm taking a look
I suspect that the issue is not with the postgres container itself
GitHub
Update yarn commands by charlesBochet · Pull Request #4644 · twenty...
This PRs simplifies and clarifies the commands available for:
local setup using nx. Always use: yarn nx <command>
self hosting / production environment not using nx. Always use: yarn <com...
and I'll try again that everything works
@paulyili I've successfully setup a fresh Twenty 0.3.3 project using the latest containers
Twenty
A modern open-source CRM
So, we should be good. From twenty-server container, here are the new command:
- yarn database:init:prod
Do you mind sharing your .env and docker compose. Just want to compare to mine
I've tried on render and on render we don't have a .env
you can take a look at the render.yaml at the root of the repo
I can help troubleshoot if you want
What user are you using to connect to your database? Is it the twenty super user?
(in your PG_DATABASE_URL)
@charles this is my docker-compose.yml (minus a few things)
this is the .env
when i ran
yarn database:init:prod
i get this:
Failed to perform 'create extension pg_graphql': QueryFailedError: permission denied to create extension "pg_graphql"
Performed 'create extension "uuid-ossp"' successfully
Failed to perform 'create extension "postgres_fdw"': QueryFailedError: permission denied to create extension "postgres_fdw"
Failed to perform 'create extension "wrappers"': QueryFailedError: permission denied for language c
Failed to perform 'create extension "mysql_fdw"': QueryFailedError: permission denied to create extension "mysql_fdw"
Failed to perform 'create airtable "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "airtable_fdw"
Failed to perform 'create bigQuery "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "bigquery_fdw"
Failed to perform 'create clickHouse "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "clickhouse_fdw"
Failed to perform 'create firebase "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "firebase_fdw"
Failed to perform 'create logflare "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "logflare_fdw"
Failed to perform 'create s3 "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "s3_fdw"
Failed to perform 'create stripe "wrappers"': QueryFailedError: permission denied to create foreign-data wrapper "stripe_fdw"
Performed 'inflect names for graphql' successfully
Failed to perform 'create function graphql': QueryFailedError: schema "graphql" does not exist
But this i can log in and it throws erros like this
Error during useFindManyRecords for "activities", QueryFailedError
since you mentioned the twenty super user for the db, i have this feeling im not using it nowok, could you ssh into your docker container and check if the postgres pg_graphql extension is present in: /opt/bitnami/postgresql/share/extension/ ?
Mmh
no actually
the issue is that you should keep: POSTGRES_USER=postgres
and not POSTGRES_USER=twenty
POSTGRES_USER is used by postgresql container to start the server. It's not a super user. If you put twenty, then it will be confused between twenty super user and this startup user
I think you should see errors in your postgres container docker logs
saying that user already exist or something like this
Bingo. that worked. 2nd set of eyes really does help!
@charles BTW that docker-compose.yml & .env is a great baseline to get a production containers running if want it running though a reverse proxy.