npx nx database:reset twenty-serverNOUVEAU
Hello, 'I'm trying to setup the project using the one link for docker, every thing is working well until i couldn't connect with [email protected]. putting error of
How could i solve this please ? thanks
6 Replies
It seems that your database is not properly initialized. Are you looking to contribute or to self-host?
Hello @charles , thanks for your response, I'm deploying the project on a Vps using docker
tried to setup latest on a fresh vm tonight, I had some issues with the DB too, not sure how it's suppose to work on the default compose file ?
ended up with something like this for the db container
and gave this postgresql_url to the server
the 'twenty' postgres user in my example is not used by the server (but it's used by the healthcheck lol) but if I don't give that, the bitnami postgres container screams at startup (empty password for default user).
--
it looks like with the default compose + env :
- the init.sql is not launched (no twenty user, no default db)
- the database_url uses the 'twenty' postgres user with 'twenty' password by default
when I tried to replicate this with POSTGRESQL_* vars and giving the default DATABASE_URL to the server, I had errors when creating the extensions (because twenty is not superuser and I think bitnami does not permit to do that with env vars)
what we could do with the default compose is
- use the postgres user by default
- or if we don't want to use a postgres superuser for the app, use postgresql trusted extensions → https://www.postgresql.org/docs/current/sql-createextension.html
if the extension is marked trusted in its control file, then it can be installed by any user who has CREATE privilege on the current databaseby adding
trusted = true
in every extension control file we want to enable with the twenty user (there is a lot, it may require work)
- or anything else but that's what came in my head tonight 🙂Here is the reference docker-compose: https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/docker-compose.yml
GitHub
twenty/packages/twenty-docker/docker-compose.yml at main · twentyhq...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty
The issues is that you are setting the default POSTGRESQL_USER to 'twenty'. You should leave it to its default 'postgres'
upon first database boot the postgres user will create 'twenty' super user, it's part of the init script
Here as POSTGRESQL_USER already is 'twenty', 'twenty' superuser cannot be created and the whole process is failing
yea the init.sql wasn't played on my install
need to test again later