##// END OF EJS Templates
docs: augment setup description with more details of http server and database...
Mads Kiilerich -
r8326:ff8651b2 default
parent child Browse files
Show More
@@ -360,8 +360,8 b' logview.pylons.util = #eee'
360 #########################
360 #########################
361
361
362 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
362 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
363 #sqlalchemy.url = postgresql://user:pass@localhost/kallithea
363 #sqlalchemy.url = postgresql://kallithea:password@localhost/kallithea
364 #sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
364 #sqlalchemy.url = mysql://kallithea:password@localhost/kallithea?charset=utf8
365 ## Note: the mysql:// prefix should also be used for MariaDB
365 ## Note: the mysql:// prefix should also be used for MariaDB
366
366
367 sqlalchemy.pool_recycle = 3600
367 sqlalchemy.pool_recycle = 3600
@@ -13,27 +13,55 b' Some further details to the steps mentio'
13 Create low level configuration file
13 Create low level configuration file
14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15
15
16 First, you will need to create a Kallithea configuration file. Run the
16 First, you will need to create a Kallithea configuration file. The
17 following command to do so::
17 configuration file is a ``.ini`` file that contains various low level settings
18 for Kallithea, e.g. configuration of how to use database, web server, email,
19 and logging.
18
20
19 kallithea-cli config-create my.ini
21 Run the following command to create the file ``my.ini`` in the current
22 directory::
20
23
21 This will create the file ``my.ini`` in the current directory. This
24 kallithea-cli config-create my.ini http_server=waitress
22 configuration file contains the various settings for Kallithea, e.g.
25
23 proxy port, email settings, usage of static files, cache, Celery
26 To get a good starting point for your configuration, specify the http server
24 settings, and logging. Extra settings can be specified like::
27 you intend to use. It can be ``waitress``, ``gearbox``, ``gevent``,
28 ``gunicorn``, or ``uwsgi``. (Apache ``mod_wsgi`` will not use this
29 configuration file, and it is fine to keep the default http_server configuration
30 unused. ``mod_wsgi`` is configured using ``httpd.conf`` directives and a WSGI
31 wrapper script.)
32
33 Extra custom settings can be specified like::
25
34
26 kallithea-cli config-create my.ini host=8.8.8.8 "[handler_console]" formatter=color_formatter
35 kallithea-cli config-create my.ini host=8.8.8.8 "[handler_console]" formatter=color_formatter
27
36
28 Populate the database
37 Populate the database
29 ^^^^^^^^^^^^^^^^^^^^^
38 ^^^^^^^^^^^^^^^^^^^^^
30
39
31 Next, you need to create the databases used by Kallithea. It is recommended to
40 Next, you need to create the databases used by Kallithea. Kallithea currently
32 use PostgreSQL or SQLite (default). If you choose a database other than the
41 supports PostgreSQL, SQLite and MariaDB/MySQL databases. It is recommended to
33 default, ensure you properly adjust the database URL in your ``my.ini``
42 start out using SQLite (the default) and move to PostgreSQL if it becomes a
34 configuration file to use this other database. Kallithea currently supports
43 bottleneck or to get a "proper" database. MariaDB/MySQL is also supported.
35 PostgreSQL, SQLite and MariaDB/MySQL databases. Create the database by running
44
36 the following command::
45 For PostgreSQL, run ``pip install psycopg2`` to get the database driver. Make
46 sure the PostgreSQL server is initialized and running. Make sure you have a
47 database user with password authentication with permissions to create databases
48 - for example by running::
49
50 sudo -u postgres createuser 'kallithea' --pwprompt --createdb
51
52 For MariaDB/MySQL, run ``pip install mysqlclient`` to get the ``MySQLdb``
53 database driver. Make sure the database server is initialized and running. Make
54 sure you have a database user with password authentication with permissions to
55 create the database - for example by running::
56
57 echo 'CREATE USER "kallithea"@"localhost" IDENTIFIED BY "password"' | sudo -u mysql mysql
58 echo 'GRANT ALL PRIVILEGES ON `kallithea`.* TO "kallithea"@"localhost"' | sudo -u mysql mysql
59
60 Check and adjust ``sqlalchemy.url`` in your ``my.ini`` configuration file to use
61 this database.
62
63 Create the database, tables, and initial content by running the following
64 command::
37
65
38 kallithea-cli db-create -c my.ini
66 kallithea-cli db-create -c my.ini
39
67
@@ -56,7 +84,6 b' repositories Kallithea will add all of t'
56 location to its database. (Note: make sure you specify the correct
84 location to its database. (Note: make sure you specify the correct
57 path to the root).
85 path to the root).
58
86
59
60 Prepare front-end files
87 Prepare front-end files
61 ^^^^^^^^^^^^^^^^^^^^^^^
88 ^^^^^^^^^^^^^^^^^^^^^^^
62
89
@@ -69,7 +96,8 b' by running::'
69 Running
96 Running
70 ^^^^^^^
97 ^^^^^^^
71
98
72 You are now ready to use Kallithea. To run it simply execute::
99 You are now ready to use Kallithea. To run it using a gearbox web server,
100 simply execute::
73
101
74 gearbox serve -c my.ini
102 gearbox serve -c my.ini
75
103
@@ -458,14 +458,14 b' sqlalchemy.url = sqlite:///%(here)s/kall'
458 #sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
458 #sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
459 %endif
459 %endif
460 %if database_engine == 'postgres':
460 %if database_engine == 'postgres':
461 sqlalchemy.url = postgresql://user:pass@localhost/kallithea
461 sqlalchemy.url = postgresql://kallithea:password@localhost/kallithea
462 %else:
462 %else:
463 #sqlalchemy.url = postgresql://user:pass@localhost/kallithea
463 #sqlalchemy.url = postgresql://kallithea:password@localhost/kallithea
464 %endif
464 %endif
465 %if database_engine == 'mysql':
465 %if database_engine == 'mysql':
466 sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
466 sqlalchemy.url = mysql://kallithea:password@localhost/kallithea?charset=utf8
467 %else:
467 %else:
468 #sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
468 #sqlalchemy.url = mysql://kallithea:password@localhost/kallithea?charset=utf8
469 %endif
469 %endif
470 <%text>##</%text> Note: the mysql:// prefix should also be used for MariaDB
470 <%text>##</%text> Note: the mysql:// prefix should also be used for MariaDB
471
471
General Comments 0
You need to be logged in to leave comments. Login now