adds funkwhale user authorization for postgres

This commit is contained in:
Wxcafé (Clément Hertling) 2018-07-12 21:07:29 +02:00
parent 19c5c8ab9b
commit 46d5293964
No known key found for this signature in database
GPG Key ID: 11E99643DEE9E336
1 changed files with 14 additions and 4 deletions

View File

@ -45,15 +45,25 @@ Create the project database and user:
CREATE USER funkwhale; CREATE USER funkwhale;
GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale; GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale;
Assuming you already have :ref:`created your funkwhale user <create-funkwhale-user>`,
you should now be able to open a postgresql shell:
.. warning:: .. warning::
It's importing that you use utf-8 encoding for your database, It's important that you use utf-8 encoding for your database,
otherwise you'll end up with errors and crashes later on when dealing otherwise you'll end up with errors and crashes later on when dealing
with music metedata that contains non-ascii chars. with music metedata that contains non-ascii chars.
On Debian you will also need to allow the funkwhale unix user to access the database:
.. code-block:: shell
cat | sudo tee -a /etc/postgresql/9.5/main/pg_hba.conf << EOF
local all funkwhale peer
EOF
sudo systemctl restart postgresql
Assuming you already have :ref:`created your funkwhale user <create-funkwhale-user>`,
you should now be able to open a postgresql shell:
.. code-block:: shell .. code-block:: shell
sudo -u funkwhale -H psql sudo -u funkwhale -H psql