Setting up wiki.js to use Postgresql socket instead of IP for host #7138
-
Hi there First time user, installing an appliance like instance of wiki.js for internal use at our small company. Postgres is automatically configured to use a socket for local connections (in Rocky Linux 9). I can't seem to find documentation about making use of this socket instead of providing 'localhost' in the config.yml. I have tried several things, including the using the socket as the host and or port in the configuration, but sadly these don't work. Is it possible to do this currently with wiki.js, and if so, how? Many thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
See https://node-postgres.com/features/connecting#unix-domain-sockets for the unix socket path format. However, no guarantee that it will work as other config properties are still defined by default. You may have more success by using a connection string. In this case, you must use an environment variable "DATABASE_URL" with the value formatted as explained in https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string#connection-strings . This will bypass whatever is defined in the config.yml. |
Beta Was this translation helpful? Give feedback.
See https://node-postgres.com/features/connecting#unix-domain-sockets for the unix socket path format. However, no guarantee that it will work as other config properties are still defined by default.
You may have more success by using a connection string. In this case, you must use an environment variable "DATABASE_URL" with the value formatted as explained in https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string#connection-strings . This will bypass whatever is defined in the config.yml.