Zeylos
npx nx database:reset twenty-serverNOUVEAU
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 🙂10 replies