Mercurial > kallithea
annotate docs/setup.rst @ 7340:2898ea3ff76c
docs: move authentication info to separate file
Goal is to reduce the gigantic 'setup' page in size, and make the
information more understandable. Currently, the different topics do not
really belong together.
This is one small step towards that goal.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Mon, 30 Jul 2018 22:07:36 +0200 |
parents | d5eaa70e0f2a |
children | b45994c0779e |
rev | line source |
---|---|
568
5f481e4e888b
updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 .. _setup: |
5f481e4e888b
updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 |
2095 | 3 ===== |
568
5f481e4e888b
updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 Setup |
5f481e4e888b
updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 ===== |
5f481e4e888b
updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 |
5f481e4e888b
updated docs, added sphinx build
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 |
7055
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
8 Preparing front-end |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
9 ------------------- |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
10 |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
11 Temporarily, in the current Kallithea version, some extra steps are required to |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
12 build front-end files: |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
13 |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
14 Find the right ``kallithea/public/less`` path with:: |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
15 |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
16 python -c "import os, kallithea; print os.path.join(os.path.dirname(os.path.abspath(kallithea.__file__)), 'public', 'less')" |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
17 |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
18 Then run:: |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
19 |
7099
1969f7dfb6b0
move package.json to root directory
domruf <dominikruf@gmail.com>
parents:
7055
diff
changeset
|
20 npm install |
1969f7dfb6b0
move package.json to root directory
domruf <dominikruf@gmail.com>
parents:
7055
diff
changeset
|
21 npm run less |
7055
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
22 |
6ef837acb0d2
less: don't distribute the generated style.css file - for now, it must be built with npm after installing Kallithea
domruf <dominikruf@gmail.com>
parents:
6898
diff
changeset
|
23 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
24 Setting up Kallithea |
1448 | 25 -------------------- |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
26 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
27 First, you will need to create a Kallithea configuration file. Run the |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
28 following command to do so:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
29 |
6555
213085032127
gearbox: make a make-config sub-command available again
Mads Kiilerich <madski@unity3d.com>
parents:
6554
diff
changeset
|
30 gearbox make-config my.ini |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
31 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
32 This will create the file ``my.ini`` in the current directory. This |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
33 configuration file contains the various settings for Kallithea, e.g. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
34 proxy port, email settings, usage of static files, cache, Celery |
6898
a8b9f2d68e7d
make-config: allow configuration of any ini value
Mads Kiilerich <mads@kiilerich.com>
parents:
6789
diff
changeset
|
35 settings, and logging. Extra settings can be specified like:: |
a8b9f2d68e7d
make-config: allow configuration of any ini value
Mads Kiilerich <mads@kiilerich.com>
parents:
6789
diff
changeset
|
36 |
a8b9f2d68e7d
make-config: allow configuration of any ini value
Mads Kiilerich <mads@kiilerich.com>
parents:
6789
diff
changeset
|
37 gearbox make-config my.ini host=8.8.8.8 "[handler_console]" formatter=color_formatter |
845 | 38 |
4902 | 39 Next, you need to create the databases used by Kallithea. It is recommended to |
4914
95fe05b1e5f8
docs: better capitalisation
Andrew Shadura <andrew@shadura.me>
parents:
4902
diff
changeset
|
40 use PostgreSQL or SQLite (default). If you choose a database other than the |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
41 default, ensure you properly adjust the database URL in your ``my.ini`` |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
42 configuration file to use this other database. Kallithea currently supports |
4914
95fe05b1e5f8
docs: better capitalisation
Andrew Shadura <andrew@shadura.me>
parents:
4902
diff
changeset
|
43 PostgreSQL, SQLite and MySQL databases. Create the database by running |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
44 the following command:: |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
45 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
46 gearbox setup-db -c my.ini |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
47 |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
48 This will prompt you for a "root" path. This "root" path is the location where |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
49 Kallithea will store all of its repositories on the current machine. After |
4185
aaa7c3331186
Rename paster command setup-rhodecode to setup-db
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4182
diff
changeset
|
50 entering this "root" path ``setup-db`` will also prompt you for a username |
aaa7c3331186
Rename paster command setup-rhodecode to setup-db
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4182
diff
changeset
|
51 and password for the initial admin account which ``setup-db`` sets |
2284
e285aa097a81
new setup-rhodecode command with optional defaults
Marcin Kuzminski <marcin@python-works.com>
parents:
2105
diff
changeset
|
52 up for you. |
845 | 53 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
54 The ``setup-db`` values can also be given on the command line. |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
55 Example:: |
2358
69df04ee1e2b
added detailed step-by-step installation instruction for windows
Marcin Kuzminski <marcin@python-works.com>
parents:
2284
diff
changeset
|
56 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
57 gearbox setup-db -c my.ini --user=nn --password=secret --email=nn@example.com --repos=/srv/repos |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
58 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
59 The ``setup-db`` command will create all needed tables and an |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
60 admin account. When choosing a root path you can either use a new |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
61 empty location, or a location which already contains existing |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
62 repositories. If you choose a location which contains existing |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
63 repositories Kallithea will add all of the repositories at the chosen |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
64 location to its database. (Note: make sure you specify the correct |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
65 path to the root). |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
66 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
67 .. note:: the given path for Mercurial_ repositories **must** be write |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
68 accessible for the application. It's very important since |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
69 the Kallithea web interface will work without write access, |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
70 but when trying to do a push it will fail with permission |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
71 denied errors unless it has write access. |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
72 |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
73 You are now ready to use Kallithea. To run it simply execute:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
74 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
75 gearbox serve -c my.ini |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
76 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
77 - This command runs the Kallithea server. The web app should be available at |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
78 http://127.0.0.1:5000. The IP address and port is configurable via the |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
79 configuration file created in the previous step. |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
80 - Log in to Kallithea using the admin account created when running ``setup-db``. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
81 - The default permissions on each repository is read, and the owner is admin. |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
82 Remember to update these if needed. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
83 - In the admin panel you can toggle LDAP, anonymous, and permissions |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
84 settings, as well as edit more advanced options on users and |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
85 repositories. |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
86 |
5077
faf943716616
rcextensions: cleanup of code and documentation
Mads Kiilerich <madski@unity3d.com>
parents:
4955
diff
changeset
|
87 |
6695
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
88 Internationalization (i18n support) |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
89 ----------------------------------- |
6732
793ea7823938
docs/setup: heading whitespace cleanup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6695
diff
changeset
|
90 |
6695
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
91 The Kallithea web interface is automatically displayed in the user's preferred |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
92 language, as indicated by the browser. Thus, different users may see the |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
93 application in different languages. If the requested language is not available |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
94 (because the translation file for that language does not yet exist or is |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
95 incomplete), the language specified in setting ``i18n.lang`` in the Kallithea |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
96 configuration file is used as fallback. If no fallback language is explicitly |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
97 specified, English is used. |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
98 |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
99 If you want to disable automatic language detection and instead configure a |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
100 fixed language regardless of user preference, set ``i18n.enabled = false`` and |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
101 set ``i18n.lang`` to the desired language (or leave empty for English). |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
102 |
8931078f70db
docs: add documentation about internationalization from a user perspective
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6555
diff
changeset
|
103 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
104 Using Kallithea with SSH |
912
8378122aa408
docs: changelog + setup update
Marcin Kuzminski <marcin@python-works.com>
parents:
894
diff
changeset
|
105 ------------------------ |
8378122aa408
docs: changelog + setup update
Marcin Kuzminski <marcin@python-works.com>
parents:
894
diff
changeset
|
106 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
107 Kallithea currently only hosts repositories using http and https. (The addition |
1309
61a6a7bf2cbd
small docs updates
Marcin Kuzminski <marcin@python-works.com>
parents:
1292
diff
changeset
|
108 of ssh hosting is a planned future feature.) However you can easily use ssh in |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
109 parallel with Kallithea. (Repository access via ssh is a standard "out of |
4914
95fe05b1e5f8
docs: better capitalisation
Andrew Shadura <andrew@shadura.me>
parents:
4902
diff
changeset
|
110 the box" feature of Mercurial_ and you can use this to access any of the |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
111 repositories that Kallithea is hosting. See PublishingRepositories_) |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
112 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
113 Kallithea repository structures are kept in directories with the same name |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
114 as the project. When using repository groups, each group is a subdirectory. |
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
115 This allows you to easily use ssh for accessing repositories. |
912
8378122aa408
docs: changelog + setup update
Marcin Kuzminski <marcin@python-works.com>
parents:
894
diff
changeset
|
116 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
117 In order to use ssh you need to make sure that your web server and the users' |
1309
61a6a7bf2cbd
small docs updates
Marcin Kuzminski <marcin@python-works.com>
parents:
1292
diff
changeset
|
118 login accounts have the correct permissions set on the appropriate directories. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
119 |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
120 .. note:: These permissions are independent of any permissions you |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
121 have set up using the Kallithea web interface. |
912
8378122aa408
docs: changelog + setup update
Marcin Kuzminski <marcin@python-works.com>
parents:
894
diff
changeset
|
122 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
123 If your main directory (the same as set in Kallithea settings) is for |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
124 example set to ``/srv/repos`` and the repository you are using is |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
125 named ``kallithea``, then to clone via ssh you should run:: |
912
8378122aa408
docs: changelog + setup update
Marcin Kuzminski <marcin@python-works.com>
parents:
894
diff
changeset
|
126 |
5497
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
127 hg clone ssh://user@kallithea.example.com/srv/repos/kallithea |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
128 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
129 Using other external tools such as mercurial-server_ or using ssh key-based |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
130 authentication is fully supported. |
912
8378122aa408
docs: changelog + setup update
Marcin Kuzminski <marcin@python-works.com>
parents:
894
diff
changeset
|
131 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
132 .. note:: In an advanced setup, in order for your ssh access to use |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
133 the same permissions as set up via the Kallithea web |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
134 interface, you can create an authentication hook to connect |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
135 to the Kallithea db and run check functions for permissions |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
136 against that. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
137 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5426
diff
changeset
|
138 |
683
341beaa9edba
Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents:
597
diff
changeset
|
139 Setting up Whoosh full text search |
341beaa9edba
Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents:
597
diff
changeset
|
140 ---------------------------------- |
341beaa9edba
Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents:
597
diff
changeset
|
141 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
142 Kallithea provides full text search of repositories using `Whoosh`__. |
894
1fed3c9161bb
fixes #90 + docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
881
diff
changeset
|
143 |
7337
d5eaa70e0f2a
remove references to pythonhosted.org (issue #293)
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7327
diff
changeset
|
144 .. __: https://whoosh.readthedocs.io/en/latest/ |
683
341beaa9edba
Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents:
597
diff
changeset
|
145 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
146 For an incremental index build, run:: |
707
1105531ae572
docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents:
683
diff
changeset
|
147 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
148 gearbox make-index -c my.ini |
683
341beaa9edba
Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents:
597
diff
changeset
|
149 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
150 For a full index rebuild, run:: |
707
1105531ae572
docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents:
683
diff
changeset
|
151 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
152 gearbox make-index -c my.ini -f |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
153 |
5855 | 154 The ``--repo-location`` option allows the location of the repositories to be overridden; |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
155 usually, the location is retrieved from the Kallithea database. |
894
1fed3c9161bb
fixes #90 + docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
881
diff
changeset
|
156 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
157 The ``--index-only`` option can be used to limit the indexed repositories to a comma-separated list:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
158 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
159 gearbox make-index -c my.ini --index-only=vcs,kallithea |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
160 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
161 To keep your index up-to-date it is necessary to do periodic index builds; |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
162 for this, it is recommended to use a crontab entry. Example:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
163 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
164 0 3 * * * /path/to/virtualenv/bin/gearbox make-index -c /path/to/kallithea/my.ini |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
165 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
166 When using incremental mode (the default), Whoosh will check the last |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
167 modification date of each file and add it to be reindexed if a newer file is |
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
168 available. The indexing daemon checks for any removed files and removes them |
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
169 from index. |
683
341beaa9edba
Implemented whoosh index building as paster command.
Marcin Kuzminski <marcin@python-works.com>
parents:
597
diff
changeset
|
170 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
171 If you want to rebuild the index from scratch, you can use the ``-f`` flag as above, |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
172 or in the admin panel you can check the "build from scratch" checkbox. |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
173 |
5413
22a3fa3c4254
docs: cleanup of casing, markup and spacing of headings
Mads Kiilerich <madski@unity3d.com>
parents:
5412
diff
changeset
|
174 |
22a3fa3c4254
docs: cleanup of casing, markup and spacing of headings
Mads Kiilerich <madski@unity3d.com>
parents:
5412
diff
changeset
|
175 Integration with issue trackers |
1838 | 176 ------------------------------- |
1657
d2a108366f8f
Added documentation for container-based and proxy pass-through authentication
Liad Shani <liadff@gmail.com>
parents:
1559
diff
changeset
|
177 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
178 Kallithea provides a simple integration with issue trackers. It's possible |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
179 to define a regular expression that will match an issue ID in commit messages, |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
180 and have that replaced with a URL to the issue. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
181 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
182 This is achieved with following three variables in the ini file:: |
1838 | 183 |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
184 issue_pat = #(\d+) |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
185 issue_server_link = https://issues.example.com/{repo}/issue/\1 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
186 issue_sub = |
1838 | 187 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
188 ``issue_pat`` is the regular expression describing which strings in |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
189 commit messages will be treated as issue references. The expression can/should |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
190 have one or more parenthesized groups that can later be referred to in |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
191 ``issue_server_link`` and ``issue_sub`` (see below). If you prefer, named groups |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
192 can be used instead of simple parenthesized groups. |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
193 |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
194 If the pattern should only match if it is preceded by whitespace, add the |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
195 following string before the actual pattern: ``(?:^|(?<=\s))``. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
196 If the pattern should only match if it is followed by whitespace, add the |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
197 following string after the actual pattern: ``(?:$|(?=\s))``. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
198 These expressions use lookbehind and lookahead assertions of the Python regular |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
199 expression module to avoid the whitespace to be part of the actual pattern, |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
200 otherwise the link text will also contain that whitespace. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
201 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
202 Matched issue references are replaced with the link specified in |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
203 ``issue_server_link``, in which any backreferences are resolved. Backreferences |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
204 can be ``\1``, ``\2``, ... or for named groups ``\g<groupname>``. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
205 The special token ``{repo}`` is replaced with the full repository path |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
206 (including repository groups), while token ``{repo_name}`` is replaced with the |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
207 repository name (without repository groups). |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
208 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
209 The link text is determined by ``issue_sub``, which can be a string containing |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
210 backreferences to the groups specified in ``issue_pat``. If ``issue_sub`` is |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
211 empty, then the text matched by ``issue_pat`` is used verbatim. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
212 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
213 The example settings shown above match issues in the format ``#<number>``. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
214 This will cause the text ``#300`` to be transformed into a link: |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
215 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
216 .. code-block:: html |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
217 |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
218 <a href="https://issues.example.com/example_repo/issue/300">#300</a> |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
219 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
220 The following example transforms a text starting with either of 'pullrequest', |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
221 'pull request' or 'PR', followed by an optional space, then a pound character |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
222 (#) and one or more digits, into a link with the text 'PR #' followed by the |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
223 digits:: |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
224 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
225 issue_pat = (pullrequest|pull request|PR) ?#(\d+) |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
226 issue_server_link = https://issues.example.com/\2 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
227 issue_sub = PR #\2 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
228 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
229 The following example demonstrates how to require whitespace before the issue |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
230 reference in order for it to be recognized, such that the text ``issue#123`` will |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
231 not cause a match, but ``issue #123`` will:: |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
232 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
233 issue_pat = (?:^|(?<=\s))#(\d+) |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
234 issue_server_link = https://issues.example.com/\1 |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
235 issue_sub = |
1657
d2a108366f8f
Added documentation for container-based and proxy pass-through authentication
Liad Shani <liadff@gmail.com>
parents:
1559
diff
changeset
|
236 |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
237 If needed, more than one pattern can be specified by appending a unique suffix to |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
238 the variables. For example, also demonstrating the use of named groups:: |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
239 |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
240 issue_pat_wiki = wiki-(?P<pagename>\S+) |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
241 issue_server_link_wiki = https://wiki.example.com/\g<pagename> |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
242 issue_sub_wiki = WIKI-\g<pagename> |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
243 |
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
244 With these settings, wiki pages can be referenced as wiki-some-id, and every |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
245 such reference will be transformed into: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
246 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
247 .. code-block:: html |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
248 |
5497
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
249 <a href="https://wiki.example.com/some-id">WIKI-some-id</a> |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
250 |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
251 Refer to the `Python regular expression documentation`_ for more details about |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
252 the supported syntax in ``issue_pat``, ``issue_server_link`` and ``issue_sub``. |
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
253 |
4848
570a4e40f0bb
docs: improve issue tracker integration docs
Andrew Shadura <andrew@shadura.me>
parents:
4522
diff
changeset
|
254 |
1467
da60cdb41969
doc update - hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
1448
diff
changeset
|
255 Hook management |
da60cdb41969
doc update - hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
1448
diff
changeset
|
256 --------------- |
da60cdb41969
doc update - hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
1448
diff
changeset
|
257 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
258 Hooks can be managed in similar way to that used in ``.hgrc`` files. |
5426
66f1b9745905
docs: update menu navigation notation to use *Menu > Menu Item*
Søren Løvborg <sorenl@unity3d.com>
parents:
5425
diff
changeset
|
259 To manage hooks, choose *Admin > Settings > Hooks*. |
1467
da60cdb41969
doc update - hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
1448
diff
changeset
|
260 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
261 The built-in hooks cannot be modified, though they can be enabled or disabled in the *VCS* section. |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
262 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
263 To add another custom hook simply fill in the first textbox with |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
264 ``<name>.<hook_type>`` and the second with the hook path. Example hooks |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
265 can be found in ``kallithea.lib.hooks``. |
1467
da60cdb41969
doc update - hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
1448
diff
changeset
|
266 |
da60cdb41969
doc update - hooks
Marcin Kuzminski <marcin@python-works.com>
parents:
1448
diff
changeset
|
267 |
2017
03a549b35c57
updated setup docs about encoding
Marcin Kuzminski <marcin@python-works.com>
parents:
1870
diff
changeset
|
268 Changing default encoding |
03a549b35c57
updated setup docs about encoding
Marcin Kuzminski <marcin@python-works.com>
parents:
1870
diff
changeset
|
269 ------------------------- |
03a549b35c57
updated setup docs about encoding
Marcin Kuzminski <marcin@python-works.com>
parents:
1870
diff
changeset
|
270 |
4914
95fe05b1e5f8
docs: better capitalisation
Andrew Shadura <andrew@shadura.me>
parents:
4902
diff
changeset
|
271 By default, Kallithea uses UTF-8 encoding. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
272 This is configurable as ``default_encoding`` in the .ini file. |
4902 | 273 This affects many parts in Kallithea including user names, filenames, and |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
274 encoding of commit messages. In addition Kallithea can detect if the ``chardet`` |
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
275 library is installed. If ``chardet`` is detected Kallithea will fallback to it |
2017
03a549b35c57
updated setup docs about encoding
Marcin Kuzminski <marcin@python-works.com>
parents:
1870
diff
changeset
|
276 when there are encode/decode errors. |
03a549b35c57
updated setup docs about encoding
Marcin Kuzminski <marcin@python-works.com>
parents:
1870
diff
changeset
|
277 |
7327
9937ae52f167
hg: set encoding to utf-8 by default to always show unicode characters correctly
Mads Kiilerich <mads@kiilerich.com>
parents:
7230
diff
changeset
|
278 The Mercurial encoding is configurable as ``hgencoding``. It is similar to |
9937ae52f167
hg: set encoding to utf-8 by default to always show unicode characters correctly
Mads Kiilerich <mads@kiilerich.com>
parents:
7230
diff
changeset
|
279 setting the ``HGENCODING`` environment variable, but will override it. |
9937ae52f167
hg: set encoding to utf-8 by default to always show unicode characters correctly
Mads Kiilerich <mads@kiilerich.com>
parents:
7230
diff
changeset
|
280 |
2017
03a549b35c57
updated setup docs about encoding
Marcin Kuzminski <marcin@python-works.com>
parents:
1870
diff
changeset
|
281 |
4902 | 282 Celery configuration |
283 -------------------- | |
777
aac24db58ce8
fixed cache problem,
Marcin Kuzminski <marcin@python-works.com>
parents:
775
diff
changeset
|
284 |
4925
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
285 Kallithea can use the distributed task queue system Celery_ to run tasks like |
5412
2079e864ce51
spelling: use "email" consistently
Søren Løvborg <sorenl@unity3d.com>
parents:
5077
diff
changeset
|
286 cloning repositories or sending emails. |
4925
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
287 |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
288 Kallithea will in most setups work perfectly fine out of the box (without |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
289 Celery), executing all tasks in the web server process. Some tasks can however |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
290 take some time to run and it can be better to run such tasks asynchronously in |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
291 a separate process so the web server can focus on serving web requests. |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
292 |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
293 For installation and configuration of Celery, see the `Celery documentation`_. |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
294 Note that Celery requires a message broker service like RabbitMQ_ (recommended) |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
295 or Redis_. |
777
aac24db58ce8
fixed cache problem,
Marcin Kuzminski <marcin@python-works.com>
parents:
775
diff
changeset
|
296 |
4925
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
297 The use of Celery is configured in the Kallithea ini configuration file. |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
298 To enable it, simply set:: |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
299 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
300 use_celery = true |
777
aac24db58ce8
fixed cache problem,
Marcin Kuzminski <marcin@python-works.com>
parents:
775
diff
changeset
|
301 |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
302 and add or change the ``celery.*`` and ``broker.*`` configuration variables. |
4925
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
303 |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
304 Remember that the ini files use the format with '.' and not with '_' like |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
305 Celery. So for example setting `BROKER_HOST` in Celery means setting |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
306 `broker.host` in the configuration file. |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
307 |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
308 To start the Celery process, run:: |
938
442ccfe939d0
fixed changelog, and setup docs. Yeeee a 1000 commit :)
Marcin Kuzminski <marcin@python-works.com>
parents:
929
diff
changeset
|
309 |
6554
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
310 gearbox celeryd -c <configfile.ini> |
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
311 |
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
312 Extra options to the Celery worker can be passed after ``--`` - see ``-- -h`` |
2c3d30095d5e
gearbox: replace paster with something TurboGears2-ish that still works with the Pylons stack
Mads Kiilerich <madski@unity3d.com>
parents:
6457
diff
changeset
|
313 for more info. |
777
aac24db58ce8
fixed cache problem,
Marcin Kuzminski <marcin@python-works.com>
parents:
775
diff
changeset
|
314 |
871
7f9e006aa26f
docs update for celeryd
Marcin Kuzminski <marcin@python-works.com>
parents:
845
diff
changeset
|
315 .. note:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
316 Make sure you run this command from the same virtualenv, and with the same |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
317 user that Kallithea runs. |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
318 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
319 |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
320 HTTPS support |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
321 ------------- |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
322 |
4448
8e26c46e9abe
https: introduce https_fixup config setting to enable the special https hacks
Mads Kiilerich <madski@unity3d.com>
parents:
4192
diff
changeset
|
323 Kallithea will by default generate URLs based on the WSGI environment. |
8e26c46e9abe
https: introduce https_fixup config setting to enable the special https hacks
Mads Kiilerich <madski@unity3d.com>
parents:
4192
diff
changeset
|
324 |
8e26c46e9abe
https: introduce https_fixup config setting to enable the special https hacks
Mads Kiilerich <madski@unity3d.com>
parents:
4192
diff
changeset
|
325 Alternatively, you can use some special configuration settings to control |
8e26c46e9abe
https: introduce https_fixup config setting to enable the special https hacks
Mads Kiilerich <madski@unity3d.com>
parents:
4192
diff
changeset
|
326 directly which scheme/protocol Kallithea will use when generating URLs: |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
327 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
328 - With ``https_fixup = true``, the scheme will be taken from the |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
329 ``X-Url-Scheme``, ``X-Forwarded-Scheme`` or ``X-Forwarded-Proto`` HTTP header |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
330 (default ``http``). |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
331 - With ``force_https = true`` the default will be ``https``. |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
332 - With ``use_htsts = true``, Kallithea will set ``Strict-Transport-Security`` when using https. |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
333 |
7340
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
334 .. _nginx_virtual_host: |
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
335 |
871
7f9e006aa26f
docs update for celeryd
Marcin Kuzminski <marcin@python-works.com>
parents:
845
diff
changeset
|
336 |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
337 Nginx virtual host example |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
338 -------------------------- |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
339 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
340 Sample config for Nginx using proxy: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
341 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
342 .. code-block:: nginx |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
343 |
4902 | 344 upstream kallithea { |
1745
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
345 server 127.0.0.1:5000; |
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
346 # add more instances for load balancing |
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
347 #server 127.0.0.1:5001; |
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
348 #server 127.0.0.1:5002; |
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
349 } |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
350 |
3850
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
351 ## gist alias |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
352 server { |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
353 listen 443; |
5497
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
354 server_name gist.example.com; |
3850
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
355 access_log /var/log/nginx/gist.access.log; |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
356 error_log /var/log/nginx/gist.error.log; |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
357 |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
358 ssl on; |
4182
05cabd91f7c3
Change example URL
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4180
diff
changeset
|
359 ssl_certificate gist.your.kallithea.server.crt; |
05cabd91f7c3
Change example URL
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4180
diff
changeset
|
360 ssl_certificate_key gist.your.kallithea.server.key; |
3850
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
361 |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
362 ssl_session_timeout 5m; |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
363 |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
364 ssl_protocols SSLv3 TLSv1; |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
365 ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5; |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
366 ssl_prefer_server_ciphers on; |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
367 |
5497
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
368 rewrite ^/(.+)$ https://kallithea.example.com/_admin/gists/$1; |
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
369 rewrite (.*) https://kallithea.example.com/_admin/gists; |
3850
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
370 } |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
371 |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
372 server { |
3243
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
373 listen 443; |
5497
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
374 server_name kallithea.example.com |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
375 access_log /var/log/nginx/kallithea.access.log; |
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
376 error_log /var/log/nginx/kallithea.error.log; |
1745
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
377 |
3243
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
378 ssl on; |
4182
05cabd91f7c3
Change example URL
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4180
diff
changeset
|
379 ssl_certificate your.kallithea.server.crt; |
05cabd91f7c3
Change example URL
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4180
diff
changeset
|
380 ssl_certificate_key your.kallithea.server.key; |
3243
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
381 |
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
382 ssl_session_timeout 5m; |
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
383 |
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
384 ssl_protocols SSLv3 TLSv1; |
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
385 ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5; |
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
386 ssl_prefer_server_ciphers on; |
c759c0912642
switch to SSL configuration example on nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3224
diff
changeset
|
387 |
3850
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
388 ## uncomment root directive if you want to serve static files by nginx |
7a4df261a375
added alias configuration option for gists.
Marcin Kuzminski <marcin@python-works.com>
parents:
3801
diff
changeset
|
389 ## requires static_files = false in .ini file |
5880
61954577a0df
docs: mention use of static_files, it's setup and implications
Mads Kiilerich <madski@unity3d.com>
parents:
5855
diff
changeset
|
390 #root /srv/kallithea/kallithea/kallithea/public; |
3917
35c0c62583cd
Moved proxy include of nginx to place where
Marcin Kuzminski <marcin@python-works.com>
parents:
3852
diff
changeset
|
391 include /etc/nginx/proxy.conf; |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
392 location / { |
4902 | 393 try_files $uri @kallithea; |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
394 } |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
395 |
4902 | 396 location @kallithea { |
5496
2b2216e8af36
docs: update example output and example server configs
Søren Løvborg <sorenl@unity3d.com>
parents:
5435
diff
changeset
|
397 proxy_pass http://127.0.0.1:5000; |
1745
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
398 } |
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
399 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
400 } |
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
401 |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
402 Here's the proxy.conf. It's tuned so it will not timeout on long |
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
403 pushes or large pushes:: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
404 |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
405 proxy_redirect off; |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
406 proxy_set_header Host $host; |
4073
2c82dd8ba318
Added two headers into example nginx proxy conf that allows container auth
Marcin Kuzminski <marcin@python-works.com>
parents:
3960
diff
changeset
|
407 ## needed for container auth |
2c82dd8ba318
Added two headers into example nginx proxy conf that allows container auth
Marcin Kuzminski <marcin@python-works.com>
parents:
3960
diff
changeset
|
408 #proxy_set_header REMOTE_USER $remote_user; |
2c82dd8ba318
Added two headers into example nginx proxy conf that allows container auth
Marcin Kuzminski <marcin@python-works.com>
parents:
3960
diff
changeset
|
409 #proxy_set_header X-Forwarded-User $remote_user; |
1745
456e1e3ce4eb
fixes #305 User guide suggests sub-optimal nginx configuration
Marcin Kuzminski <marcin@python-works.com>
parents:
1657
diff
changeset
|
410 proxy_set_header X-Url-Scheme $scheme; |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
411 proxy_set_header X-Host $http_host; |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
412 proxy_set_header X-Real-IP $remote_addr; |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
413 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
414 proxy_set_header Proxy-host $proxy_host; |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
415 proxy_buffering off; |
1420
a2fe0ac8d007
Updated nginx proxy example to work better with large pushes
Marcin Kuzminski <marcin@python-works.com>
parents:
1408
diff
changeset
|
416 proxy_connect_timeout 7200; |
a2fe0ac8d007
Updated nginx proxy example to work better with large pushes
Marcin Kuzminski <marcin@python-works.com>
parents:
1408
diff
changeset
|
417 proxy_send_timeout 7200; |
a2fe0ac8d007
Updated nginx proxy example to work better with large pushes
Marcin Kuzminski <marcin@python-works.com>
parents:
1408
diff
changeset
|
418 proxy_read_timeout 7200; |
a2fe0ac8d007
Updated nginx proxy example to work better with large pushes
Marcin Kuzminski <marcin@python-works.com>
parents:
1408
diff
changeset
|
419 proxy_buffers 8 32k; |
3919
b367b016ee39
Added large_client_header_buffers directive into example nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3917
diff
changeset
|
420 client_max_body_size 1024m; |
b367b016ee39
Added large_client_header_buffers directive into example nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3917
diff
changeset
|
421 client_body_buffer_size 128k; |
b367b016ee39
Added large_client_header_buffers directive into example nginx
Marcin Kuzminski <marcin@python-works.com>
parents:
3917
diff
changeset
|
422 large_client_header_buffers 8 64k; |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
423 |
7340
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
424 .. _apache_virtual_host_reverse_proxy: |
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
425 |
881
68aaa0aca0d2
Updated docs, added apache proxy example config
Marcin Kuzminski <marcin@python-works.com>
parents:
871
diff
changeset
|
426 |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
427 Apache virtual host reverse proxy example |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
428 ----------------------------------------- |
881
68aaa0aca0d2
Updated docs, added apache proxy example config
Marcin Kuzminski <marcin@python-works.com>
parents:
871
diff
changeset
|
429 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
430 Here is a sample configuration file for Apache using proxy: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
431 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
432 .. code-block:: apache |
881
68aaa0aca0d2
Updated docs, added apache proxy example config
Marcin Kuzminski <marcin@python-works.com>
parents:
871
diff
changeset
|
433 |
929 | 434 <VirtualHost *:80> |
5497
12b47803189f
cleanup: use example.com for tests and examples
Søren Løvborg <sorenl@unity3d.com>
parents:
5496
diff
changeset
|
435 ServerName kallithea.example.com |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
436 |
929 | 437 <Proxy *> |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
438 # For Apache 2.4 and later: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
439 Require all granted |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
440 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
441 # For Apache 2.2 and earlier, instead use: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
442 # Order allow,deny |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
443 # Allow from all |
929 | 444 </Proxy> |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
445 |
929 | 446 #important ! |
6339
8845ece50d51
docs: remove some references to Pylons
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
6335
diff
changeset
|
447 #Directive to properly generate url (clone url) for Kallithea |
929 | 448 ProxyPreserveHost On |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
449 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
450 #kallithea instance |
929 | 451 ProxyPass / http://127.0.0.1:5000/ |
452 ProxyPassReverse / http://127.0.0.1:5000/ | |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
453 |
929 | 454 #to enable https use line below |
455 #SetEnvIf X-Url-Scheme https HTTPS=1 | |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
456 </VirtualHost> |
881
68aaa0aca0d2
Updated docs, added apache proxy example config
Marcin Kuzminski <marcin@python-works.com>
parents:
871
diff
changeset
|
457 |
68aaa0aca0d2
Updated docs, added apache proxy example config
Marcin Kuzminski <marcin@python-works.com>
parents:
871
diff
changeset
|
458 Additional tutorial |
4915
6892b0515af9
docs: replace a dead link to the pylons cookbook
Andrew Shadura <andrew@shadura.me>
parents:
4914
diff
changeset
|
459 http://pylonsbook.com/en/1.1/deployment.html#using-apache-to-proxy-requests-to-pylons |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
460 |
7340
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
461 .. _apache_subdirectory: |
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
462 |
707
1105531ae572
docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents:
683
diff
changeset
|
463 |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
464 Apache as subdirectory |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
465 ---------------------- |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
466 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
467 Apache subdirectory part: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
468 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
469 .. code-block:: apache |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
470 |
6789
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
6732
diff
changeset
|
471 <Location /PREFIX > |
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
6732
diff
changeset
|
472 ProxyPass http://127.0.0.1:5000/PREFIX |
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
6732
diff
changeset
|
473 ProxyPassReverse http://127.0.0.1:5000/PREFIX |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
474 SetEnvIf X-Url-Scheme https HTTPS=1 |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
475 </Location> |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
476 |
1392
00b8fca6886c
fixes issue #206
Marcin Kuzminski <marcin@python-works.com>
parents:
1386
diff
changeset
|
477 Besides the regular apache setup you will need to add the following line |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
478 into ``[app:main]`` section of your .ini file:: |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
479 |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
480 filter-with = proxy-prefix |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
481 |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
482 Add the following at the end of the .ini file:: |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
483 |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
484 [filter:proxy-prefix] |
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
485 use = egg:PasteDeploy#prefix |
6789
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
6732
diff
changeset
|
486 prefix = /PREFIX |
1062
053983a464e4
docs and readme update
Marcin Kuzminski <marcin@python-works.com>
parents:
992
diff
changeset
|
487 |
6789
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
6732
diff
changeset
|
488 then change ``PREFIX`` into your chosen prefix |
1226
f17fdbe86ab9
update docs for setup
Marcin Kuzminski <marcin@python-works.com>
parents:
1123
diff
changeset
|
489 |
7340
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
490 .. _apache_mod_wsgi: |
2898ea3ff76c
docs: move authentication info to separate file
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7337
diff
changeset
|
491 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5426
diff
changeset
|
492 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
493 Apache with mod_wsgi |
1386
5a31d387f347
Added example wsgi config into docs
Marcin Kuzminski <marcin@python-works.com>
parents:
1309
diff
changeset
|
494 -------------------- |
5a31d387f347
Added example wsgi config into docs
Marcin Kuzminski <marcin@python-works.com>
parents:
1309
diff
changeset
|
495 |
4192
e73a69cb98dc
Rename some strings examples and commands in documentation
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
496 Alternatively, Kallithea can be set up with Apache under mod_wsgi. For |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
497 that, you'll need to: |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
498 |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
499 - Install mod_wsgi. If using a Debian-based distro, you can install |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
500 the package libapache2-mod-wsgi:: |
1559
a9fef2e6c1ff
Syntax correction on the recently changed documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1558
diff
changeset
|
501 |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
502 aptitude install libapache2-mod-wsgi |
1559
a9fef2e6c1ff
Syntax correction on the recently changed documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1558
diff
changeset
|
503 |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
504 - Enable mod_wsgi:: |
1559
a9fef2e6c1ff
Syntax correction on the recently changed documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1558
diff
changeset
|
505 |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
506 a2enmod wsgi |
1559
a9fef2e6c1ff
Syntax correction on the recently changed documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1558
diff
changeset
|
507 |
5789
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
508 - Add global Apache configuration to tell mod_wsgi that Python only will be |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
509 used in the WSGI processes and shouldn't be initialized in the Apache |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
510 processes:: |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
511 |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
512 WSGIRestrictEmbedded On |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
513 |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
514 - Create a wsgi dispatch script, like the one below. Make sure you |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
515 check that the paths correctly point to where you installed Kallithea |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
516 and its Python Virtual Environment. |
4955
4e6dfdb3fa01
docs: English and consistency corrections
Michael V. DePalatis <mike@depalatis.net>
parents:
4925
diff
changeset
|
517 - Enable the ``WSGIScriptAlias`` directive for the WSGI dispatch script, |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
518 as in the following example. Once again, check the paths are |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
519 correctly specified. |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
520 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
521 Here is a sample excerpt from an Apache Virtual Host configuration file: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
522 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
523 .. code-block:: apache |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
524 |
6153
d6942b2b421c
config: clarify that we only recommend and support single threaded operation
Mads Kiilerich <madski@unity3d.com>
parents:
5880
diff
changeset
|
525 WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 \ |
5789
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
526 python-home=/srv/kallithea/venv |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
527 WSGIProcessGroup kallithea |
4902 | 528 WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
2076
77d215d6121f
docs on apache WSGI update
Marcin Kuzminski <marcin@python-works.com>
parents:
2017
diff
changeset
|
529 WSGIPassAuthorization On |
1386
5a31d387f347
Added example wsgi config into docs
Marcin Kuzminski <marcin@python-works.com>
parents:
1309
diff
changeset
|
530 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
531 Or if using a dispatcher WSGI script with proper virtualenv activation: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
532 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
533 .. code-block:: apache |
4902 | 534 |
6153
d6942b2b421c
config: clarify that we only recommend and support single threaded operation
Mads Kiilerich <madski@unity3d.com>
parents:
5880
diff
changeset
|
535 WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 |
5789
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
536 WSGIProcessGroup kallithea |
4902 | 537 WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
538 WSGIPassAuthorization On | |
539 | |
5789
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
540 Apache will by default run as a special Apache user, on Linux systems |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
541 usually ``www-data`` or ``apache``. If you need to have the repositories |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
542 directory owned by a different user, use the user and group options to |
5791 | 543 WSGIDaemonProcess to set the name of the user and group. |
2800
6540ee9179da
updated apache wsgi example ref #535
Marcin Kuzminski <marcin@python-works.com>
parents:
2748
diff
changeset
|
544 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
545 Example WSGI dispatch script: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
546 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
547 .. code-block:: python |
707
1105531ae572
docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents:
683
diff
changeset
|
548 |
1386
5a31d387f347
Added example wsgi config into docs
Marcin Kuzminski <marcin@python-works.com>
parents:
1309
diff
changeset
|
549 import os |
4902 | 550 os.environ['PYTHON_EGG_CACHE'] = '/srv/kallithea/.egg-cache' |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
551 |
5832 | 552 # sometimes it's needed to set the current dir |
4902 | 553 os.chdir('/srv/kallithea/') |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
554 |
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
555 import site |
5592
57bae44fd22e
docs: consistently use venv instead of pyenv
Mads Kiilerich <madski@unity3d.com>
parents:
5497
diff
changeset
|
556 site.addsitedir("/srv/kallithea/venv/lib/python2.7/site-packages") |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2916
diff
changeset
|
557 |
5789
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
558 ini = '/srv/kallithea/my.ini' |
1386
5a31d387f347
Added example wsgi config into docs
Marcin Kuzminski <marcin@python-works.com>
parents:
1309
diff
changeset
|
559 from paste.script.util.logging_config import fileConfig |
5789
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
560 fileConfig(ini) |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
561 from paste.deploy import loadapp |
8c479b274e03
docs: improve mod_wsgi documentation (Issue #203)
Mads Kiilerich <madski@unity3d.com>
parents:
5788
diff
changeset
|
562 application = loadapp('config:' + ini) |
4902 | 563 |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
564 Or using proper virtualenv activation: |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
565 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
566 .. code-block:: python |
4902 | 567 |
568 activate_this = '/srv/kallithea/venv/bin/activate_this.py' | |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
569 execfile(activate_this, dict(__file__=activate_this)) |
1386
5a31d387f347
Added example wsgi config into docs
Marcin Kuzminski <marcin@python-works.com>
parents:
1309
diff
changeset
|
570 |
4902 | 571 import os |
572 os.environ['HOME'] = '/srv/kallithea' | |
573 | |
574 ini = '/srv/kallithea/kallithea.ini' | |
575 from paste.script.util.logging_config import fileConfig | |
576 fileConfig(ini) | |
577 from paste.deploy import loadapp | |
578 application = loadapp('config:' + ini) | |
1558
662173ba1846
Improvements to mod_wsgi setup documentation.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents:
1467
diff
changeset
|
579 |
707
1105531ae572
docs update, added ldap section, added troubleshooting section
Marcin Kuzminski <marcin@python-works.com>
parents:
683
diff
changeset
|
580 |
591 | 581 Other configuration files |
582 ------------------------- | |
583 | |
5425
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
584 A number of `example init.d scripts`__ can be found in |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
585 the ``init.d`` directory of the Kallithea source. |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
586 |
5ae8e644aa88
docs: spelling, grammar, content and typography
Søren Løvborg <sorenl@unity3d.com>
parents:
5413
diff
changeset
|
587 .. __: https://kallithea-scm.org/repos/kallithea/files/tip/init.d/ . |
591 | 588 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5426
diff
changeset
|
589 |
572
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
590 .. _virtualenv: http://pypi.python.org/pypi/virtualenv |
a60cd29ba7e2
more docs update
Marcin Kuzminski <marcin@python-works.com>
parents:
568
diff
changeset
|
591 .. _python: http://www.python.org/ |
7230
d24051ce961c
issues: support generic regex replacements in issue_url and issue_prefix
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7099
diff
changeset
|
592 .. _Python regular expression documentation: https://docs.python.org/2/library/re.html |
6334
cc21a2b86a30
docs: update links to Mercurial's website and wiki
Anton Shestakov <av6@dwimlabs.net>
parents:
5791
diff
changeset
|
593 .. _Mercurial: https://www.mercurial-scm.org/ |
4925
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
594 .. _Celery: http://celeryproject.org/ |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
595 .. _Celery documentation: http://docs.celeryproject.org/en/latest/getting-started/index.html |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
596 .. _RabbitMQ: http://www.rabbitmq.com/ |
56cd202b777e
docs: move all instructions on Celery to Setup
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
4915
diff
changeset
|
597 .. _Redis: http://redis.io/ |
1092
8af52e1224ff
merge docs in beta with those corrected by Jason Harris
Marcin Kuzminski <marcin@python-works.com>
parents:
1062
diff
changeset
|
598 .. _mercurial-server: http://www.lshift.net/mercurial-server.html |
6334
cc21a2b86a30
docs: update links to Mercurial's website and wiki
Anton Shestakov <av6@dwimlabs.net>
parents:
5791
diff
changeset
|
599 .. _PublishingRepositories: https://www.mercurial-scm.org/wiki/PublishingRepositories |