diff docs/setup.rst @ 8592:307c876a6e89

db: introduce db-create --reuse option Support use of an existing database so the Kallithea database user doesn't have to be granted permissions to create databases. The existing database must of course have been created "correctly", for example using the right charset and collation on MariaDB/MySQL. Creating the database manually also provides a way to avoid the hardcoded defaults.
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 25 Jun 2020 01:51:18 +0200
parents ff8651b2f14f
children 61bd04b90f58
line wrap: on
line diff
--- a/docs/setup.rst	Thu Jun 25 02:06:01 2020 +0200
+++ b/docs/setup.rst	Thu Jun 25 01:51:18 2020 +0200
@@ -84,6 +84,15 @@
 location to its database.  (Note: make sure you specify the correct
 path to the root).
 
+.. note:: It is also possible to use an existing database. For example,
+          when using PostgreSQL without granting general createdb privileges to
+          the PostgreSQL kallithea user, set ``sqlalchemy.url =
+          postgresql://kallithea:password@localhost/kallithea`` and create the
+          database like::
+
+              sudo -u postgres createdb 'kallithea' --owner 'kallithea'
+              kallithea-cli db-create -c my.ini --reuse
+
 Prepare front-end files
 ^^^^^^^^^^^^^^^^^^^^^^^