##// END OF EJS Templates
docs: give "File system location" overview...
Mads Kiilerich -
r8384:c354d1a7 default
parent child Browse files
Show More
@@ -80,8 +80,10 b' main Python installation and other appli'
80 problematic when upgrading the system or Kallithea.
80 problematic when upgrading the system or Kallithea.
81 An additional benefit of virtualenv is that it doesn't require root privileges.
81 An additional benefit of virtualenv is that it doesn't require root privileges.
82
82
83 - Assuming you have installed virtualenv, create a new virtual environment
83 - Don't install as root - install as a dedicated user like ``kallithea``.
84 for example, in `/srv/kallithea/venv`, using the venv command::
84
85 - Create a new virtual environment, for example in ``/srv/kallithea/venv``,
86 specifying the right Python binary::
85
87
86 python3 -m venv /srv/kallithea/venv
88 python3 -m venv /srv/kallithea/venv
87
89
@@ -92,16 +94,10 b' An additional benefit of virtualenv is t'
92 . /srv/kallithea/venv/bin/activate
94 . /srv/kallithea/venv/bin/activate
93 pip install --upgrade pip setuptools
95 pip install --upgrade pip setuptools
94
96
95 .. note:: You can't use UNIX ``sudo`` to source the ``virtualenv`` script; it
97 .. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it
96 will "activate" a shell that terminates immediately. It is also perfectly
98 will "activate" a shell that terminates immediately.
97 acceptable (and desirable) to create a virtualenv as a normal user.
98
99
99 - Make a folder for Kallithea data files, and configuration somewhere on the
100 - Install Kallithea in the activated virtualenv::
100 filesystem. For example::
101
102 mkdir /srv/kallithea
103
104 - Go into the created directory and run this command to install Kallithea::
105
101
106 pip install --upgrade kallithea
102 pip install --upgrade kallithea
107
103
@@ -48,6 +48,40 b' See the subsequent sections, the separat'
48 :ref:`setup` for details on these steps.
48 :ref:`setup` for details on these steps.
49
49
50
50
51 File system location
52 --------------------
53
54 Kallithea can be installed in many different ways. The main parts are:
55
56 - A location for the Kallithea software and its dependencies. This includes
57 the Python code, template files, and front-end code. After installation, this
58 will be read-only (except when upgrading).
59
60 - A location for the ``.ini`` configuration file that tells the Kallithea
61 instance which database to use (and thus also the repository location).
62 After installation, this will be read-only (except when upgrading).
63
64 - A location for various data files and caches for the Kallithea instance. This
65 is by default in a ``data`` directory next to the ``.ini`` file. This will
66 have to be writable by the running Kallithea service.
67
68 - A database. The ``.ini`` file specifies which database to use. The database
69 will be a separate service and live elsewhere in the filesystem if using
70 PostgreSQL or MariaDB/MySQL. If using SQLite, it will by default live next to
71 the ``.ini`` file, as ``kallithea.db``.
72
73 - A location for the repositories that are hosted by this Kallithea instance.
74 This will have to be writable by the running Kallithea service. The path to
75 this location will be configured in the database.
76
77 For simple setups, it is fine to just use something like a ``kallithea`` user
78 with home in ``/home/kallithea`` and place everything there.
79
80 For experiments, it might be convenient to run everything as yourself and work
81 inside a clone of Kallithea, with the ``.ini`` and SQLite database in the root
82 of the clone.
83
84
51 Python environment
85 Python environment
52 ------------------
86 ------------------
53
87
@@ -5,8 +5,8 b' Setup'
5 =====
5 =====
6
6
7
7
8 Setting up Kallithea
8 Setting up a Kallithea instance
9 --------------------
9 -------------------------------
10
10
11 Some further details to the steps mentioned in the overview.
11 Some further details to the steps mentioned in the overview.
12
12
@@ -18,7 +18,8 b' configuration file is a ``.ini`` file th'
18 for Kallithea, e.g. configuration of how to use database, web server, email,
18 for Kallithea, e.g. configuration of how to use database, web server, email,
19 and logging.
19 and logging.
20
20
21 Run the following command to create the file ``my.ini`` in the current
21 Change to the desired directory (such as ``/srv/kallithea``) as the right user
22 and run the following command to create the file ``my.ini`` in the current
22 directory::
23 directory::
23
24
24 kallithea-cli config-create my.ini http_server=waitress
25 kallithea-cli config-create my.ini http_server=waitress
General Comments 0
You need to be logged in to leave comments. Login now