Difference between revisions of "User:Jtraulle/DiscourseMigration"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
Tag: 2017 source edit
Line 8: Line 8:
 
  - "5432:5432"
 
  - "5432:5432"
 
2. Rebuild the container to take into account modifications to '''<code>app.yml</code>''' :
 
2. Rebuild the container to take into account modifications to '''<code>app.yml</code>''' :
  .launcher rebuild app
+
  ./launcher rebuild app
 
3. Enter into the container, login as the default postgresql user, add a new user and grant it all perms to the database
 
3. Enter into the container, login as the default postgresql user, add a new user and grant it all perms to the database
 
  ./launcher enter app
 
  ./launcher enter app

Revision as of 08:55, 1 August 2019

This page gathers info about Discourse migration.

Allow PostgreSQL to be accessed from an external application

Useful to be able to access the database from a graphical client (like pgAdmin 4, TablePlus or Postico for example).

1. Expose the 5432 TCP port from the container to the host by adding this line to the expose: section of containers/app.yml :

- "5432:5432"

2. Rebuild the container to take into account modifications to app.yml :

./launcher rebuild app

3. Enter into the container, login as the default postgresql user, add a new user and grant it all perms to the database

./launcher enter app
sudo -u postgres psql discourse
CREATE USER my_username WITH PASSWORD 'my_password';
GRANT ALL PRIVILEGES ON DATABASE "discourse" to my_username;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO my_username;
\q