The discussion revolves around accessing the PostgreSQL database used by Discourse within a Docker container. badr seeks the username and password for the PostgreSQL DB and asks if changing the password will affect Discourse. watchmanmonitor suggests creating a new service account, but badr notes that access is needed first. tgxworld provides the command to access the database: ./launcher enter app followed by su postgres -c "psql discourse", referencing the default template for credentials. badr confirms this resolves the issue. codinghorror adds useful PostgreSQL commands for database exploration, such as listing databases (\l), selecting a database (\c dbname), and querying tables. Later, codinghorror notes that the command may fail if the container isn’t running, requiring ./launcher start app to resolve the issue.
I need to integrate a product on my discourse by adding some tables to the discourse db in postgres. Where can I find the username and password for the PostGres DB Discourse is using.
I also wanted to ask if I change the postgres password like its suggested here:
./launcher enter app
su - postgres
psql
ALTER ROLE postgres WITH PASSWORD 'your-new-password';
will that break discourse or will discourse work with that new password…
Abbiamo istruzioni aggiornate qui? Quando provo ora ottengo
root@endoffice-b:/var/discourse# su postgres -c "psql discourse"
No passwd entry for user 'postgres'
ah aspetta, il riavvio ha aiutato e questo ha funzionato:
root@endoffice-b:/var/discourse# ./launcher enter app
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
root@endoffice-b-app:/var/www/discourse# su postgres -c 'psql discourse'
psql (13.7 (Debian 13.7-1.pgdg110+1))
Type "help" for help.
Fondamentalmente dovevo avviare il container Docker: