##// END OF EJS Templates
merge stable
Thomas De Schampheleire -
r8316:a04d6926 merge default
parent child Browse files
Show More
@@ -362,6 +362,7 b' logview.pylons.util = #eee'
362 362 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
363 363 #sqlalchemy.url = postgresql://user:pass@localhost/kallithea
364 364 #sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
365 ## Note: the mysql:// prefix should also be used for MariaDB
365 366
366 367 sqlalchemy.pool_recycle = 3600
367 368
@@ -22,8 +22,8 b' 2. **Install Kallithea software.**'
22 22
23 23 3. **Create low level configuration file.**
24 24 Use ``kallithea-cli config-create`` to create a ``.ini`` file with database
25 connection info, mail server information, some web server configuration,
26 etc.
25 connection info, mail server information, configuration for the specified
26 web server, etc.
27 27
28 28 4. **Populate the database.**
29 29 Use ``kallithea-cli db-create`` with the ``.ini`` file to create the
@@ -141,9 +141,11 b' installed.'
141 141 but build the Kallithea package itself locally instead of downloading it.)
142 142
143 143 .. note::
144 Kallithea includes front-end code that needs to be processed first.
145 The tool npm_ is used to download external dependencies and orchestrate the
146 processing. The ``npm`` binary must thus be available.
144 Kallithea includes front-end code that needs to be processed to prepare
145 static files that can be served at run time and used on the client side. The
146 tool npm_ is used to download external dependencies and orchestrate the
147 processing. The ``npm`` binary must thus be available at install time but is
148 not used at run time.
147 149
148 150
149 151 Web server
@@ -166,19 +168,24 b' There are several web server options:'
166 168 Actual use in production might have different requirements and need extra
167 169 work to make it manageable as a scalable system service.
168 170
169 Gearbox comes with its own built-in web server but Kallithea defaults to use
170 Waitress_. Gunicorn_ is also an option. These web servers have different
171 limited feature sets.
171 Gearbox comes with its own built-in web server for development but Kallithea
172 defaults to using Waitress_. Gunicorn_ and Gevent_ are also options. These
173 web servers have different limited feature sets.
172 174
173 The web server used by ``gearbox`` is configured in the ``.ini`` file passed
174 to it. The entry point for the WSGI application is configured
175 in ``setup.py`` as ``kallithea.config.application:make_app``.
175 The web server used by ``gearbox serve`` is configured in the ``.ini`` file.
176 Create it with ``config-create`` using for example ``http_server=waitress``
177 to get a configuration starting point for your choice of web server.
178
179 (Gearbox will do like ``paste`` and use the WSGI application entry point
180 ``kallithea.config.middleware:make_app`` as specified in ``setup.py``.)
176 181
177 182 - `Apache httpd`_ can serve WSGI applications directly using mod_wsgi_ and a
178 183 simple Python file with the necessary configuration. This is a good option if
179 184 Apache is an option.
180 185
181 - uWSGI_ is also a full web server with built-in WSGI module.
186 - uWSGI_ is also a full web server with built-in WSGI module. Use
187 ``config-create`` with ``http_server=uwsgi`` to get a ``.ini`` file with
188 uWSGI configuration.
182 189
183 190 - IIS_ can also server WSGI applications directly using isapi-wsgi_.
184 191
@@ -197,9 +204,18 b' dynamically generated pages from a relat'
197 204 also often used inside organizations with a limited amount of users and thus no
198 205 continuous hammering from the internet.
199 206
207 .. note::
208 Kallithea, the libraries it uses, and Python itself do in several places use
209 simple caching in memory. Caches and memory are not always released in a way
210 that is suitable for long-running processes. They might appear to be leaking
211 memory. The worker processes should thus regularly be restarted - for
212 example after 1000 requests and/or one hour. This can usually be done by the
213 web server or the tool used for running it as a system service.
214
200 215
201 216 .. _Python: http://www.python.org/
202 217 .. _Gunicorn: http://gunicorn.org/
218 .. _Gevent: http://www.gevent.org/
203 219 .. _Waitress: http://waitress.readthedocs.org/en/latest/
204 220 .. _Gearbox: http://turbogears.readthedocs.io/en/latest/turbogears/gearbox.html
205 221 .. _PyPI: https://pypi.python.org/pypi
@@ -24,7 +24,7 b' Next, you need to create the databases u'
24 24 use PostgreSQL or SQLite (default). If you choose a database other than the
25 25 default, ensure you properly adjust the database URL in your ``my.ini``
26 26 configuration file to use this other database. Kallithea currently supports
27 PostgreSQL, SQLite and MySQL databases. Create the database by running
27 PostgreSQL, SQLite and MariaDB/MySQL databases. Create the database by running
28 28 the following command::
29 29
30 30 kallithea-cli db-create -c my.ini
@@ -54,7 +54,9 b' path to the root).'
54 54 but when trying to do a push it will fail with permission
55 55 denied errors unless it has write access.
56 56
57 Finally, prepare the front-end by running::
57 Finally, the front-end files must be prepared. This requires ``npm`` version 6
58 or later, which needs ``node.js`` (version 12 or later). Prepare the front-end
59 by running::
58 60
59 61 kallithea-cli front-end-build
60 62
@@ -51,7 +51,7 b' file.'
51 51 If using PostgreSQL, please consult the documentation for the ``pg_dump``
52 52 utility.
53 53
54 If using MySQL, please consult the documentation for the ``mysqldump``
54 If using MariaDB/MySQL, please consult the documentation for the ``mysqldump``
55 55 utility.
56 56
57 57 Look for ``sqlalchemy.url`` in your configuration file to determine
@@ -40,7 +40,7 b' SQLite is a good option when having a sm'
40 40 locking issues with SQLite, it is not recommended to use it for larger
41 41 deployments.
42 42
43 Switching to MySQL or PostgreSQL will result in an immediate performance
43 Switching to PostgreSQL or MariaDB/MySQL will result in an immediate performance
44 44 increase. A tool like SQLAlchemyGrate_ can be used for migrating to another
45 45 database platform.
46 46
@@ -467,6 +467,7 b' sqlalchemy.url = mysql://user:pass@local'
467 467 %else:
468 468 #sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
469 469 %endif
470 <%text>##</%text> Note: the mysql:// prefix should also be used for MariaDB
470 471
471 472 sqlalchemy.pool_recycle = 3600
472 473
@@ -329,7 +329,7 b' class MercurialChangeset(BaseChangeset):'
329 329 #vals = url,rev,type
330 330 loc = vals[0]
331 331 cs = vals[1]
332 dirnodes.append(SubModuleNode(k, url=loc, changeset=cs,
332 dirnodes.append(SubModuleNode(safe_str(k), url=safe_str(loc), changeset=cs,
333 333 alias=als))
334 334 nodes = dirnodes + filenodes
335 335 for node in nodes:
@@ -230,7 +230,7 b' class MercurialRepository(BaseRepository'
230 230 return {}
231 231
232 232 return OrderedDict(sorted(
233 ((safe_str(n), ascii_str(h)) for n, h in self._repo._bookmarks.items()),
233 ((safe_str(n), ascii_str(mercurial.node.hex(h))) for n, h in self._repo._bookmarks.items()),
234 234 reverse=True,
235 235 key=lambda x: x[0], # sort by name
236 236 ))
@@ -603,4 +603,4 b' class SubModuleNode(Node):'
603 603 then only last part is returned.
604 604 """
605 605 org = self.path.rstrip('/').rsplit('/', 1)[-1]
606 return '%s @ %s' % (org, self.changeset.short_id)
606 return '%s @ %s' % (org, safe_str(self.changeset.short_id))
General Comments 0
You need to be logged in to leave comments. Login now