401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
1 |
:command:`serve-branches`
|
2 |
=========================
|
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
3 |
|
401.2.7
by Tres Seaver
Use 'Loggerhead' as the display name; fix typos. |
4 |
The :command:`serve-branches` script runs a standalone Loggerhead server in |
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
5 |
the foreground. |
6 |
||
7 |
.. program:: serve-branches |
|
8 |
||
9 |
Usage
|
|
10 |
-----
|
|
11 |
||
12 |
.. code-block:: sh |
|
13 |
||
14 |
serve-branches [OPTIONS] <target directory> |
|
15 |
||
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
16 |
Options
|
17 |
-------
|
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
18 |
|
19 |
.. cmdoption:: --user-dirs |
|
20 |
||
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
21 |
Serve user directories as ``~user`` (requires ``--trunk-dir``). |
22 |
||
23 |
If both options are set, then for requests where the CGI ``PATH_INFO``
|
|
24 |
starts with "/~<name>", serve branches under the <name> directory. |
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
25 |
|
26 |
.. cmdoption:: --trunk-dir=DIR |
|
27 |
||
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
28 |
The directory that contains the trunk branches (requires ``--user-dirs``).
|
29 |
||
30 |
If both options are set, then for requests where the CGI ``PATH_INFO``
|
|
31 |
does not start with "/~<name>", serve branches under DIR. |
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
32 |
|
33 |
.. cmdoption:: --port |
|
34 |
||
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
35 |
Listen on the given port. |
36 |
||
37 |
Defaults to 8080. |
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
38 |
|
39 |
.. cmdoption:: --host |
|
40 |
||
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
41 |
Listen on the interface corresponding to the given IP. |
42 |
||
43 |
Defaults to listening on all interfaces, i.e., "0.0.0.0". |
|
44 |
||
45 |
.. cmdoption:: --protocol |
|
46 |
||
47 |
Serve the application using the specified protocol. |
|
48 |
||
49 |
Can be one of: "http", "scgi", "fcgi", "ajp" (defaults to "http"). |
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
50 |
|
51 |
.. cmdoption:: --prefix |
|
52 |
||
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
53 |
Set the supplied value as the CGI ``SCRIPT_NAME`` for the application.
|
54 |
||
55 |
This option is intended for use when serving Loggerhead behind a |
|
56 |
reverse proxy, with Loggerhead being "mounted" at a directory below |
|
57 |
the root. E.g., if the reverse proxy translates requests for |
|
58 |
``http://example.com/loggerhead`` onto the standalone Loggerhead process,
|
|
59 |
that process should be run with ``--prefix=/loggerhead``.
|
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
60 |
|
61 |
.. cmdoption:: --log-folder=LOG_FOLDER |
|
62 |
||
401.2.7
by Tres Seaver
Use 'Loggerhead' as the display name; fix typos. |
63 |
The directory in which to place Loggerhead's log files. |
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
64 |
|
65 |
Defaults to the current directory. |
|
66 |
||
67 |
.. cmdoption:: --cache-dir=SQL_CACHE_DIR |
|
68 |
||
69 |
The directory in which to place the SQL cache. |
|
70 |
||
71 |
Defaults to the current directory. |
|
72 |
||
73 |
.. cmdoption:: --use-cdn |
|
74 |
||
75 |
Serve YUI javascript libraries from Yahoo!'s CDN. |
|
76 |
||
77 |
.. cmdoption:: --allow-writes |
|
78 |
||
79 |
Allow writing to the Bazaar server. |
|
80 |
||
401.2.7
by Tres Seaver
Use 'Loggerhead' as the display name; fix typos. |
81 |
Setting this option keeps Loggerhead from adding a 'readonly+' prefix |
401.2.9
by Tres Seaver
Try to clarify my reverse-engineered explanation of --allow-writes semantics. |
82 |
to the base URL of the branch. The only effect of suppressing this prefix |
83 |
is to make visible the display of instructions for checking out the |
|
84 |
'public_branch' URL for the branch being browsed. |
|
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
85 |
|
86 |
.. cmdoption:: -h, --help |
|
87 |
||
88 |
Print the help message and exit |
|
401.2.1
by Tres Seaver
Add Sphinx-based documentation. |
89 |
|
90 |
.. cmdoption:: --version |
|
91 |
||
92 |
Print the software version and exit. |
|
401.2.2
by Tres Seaver
ReST fixups, better cross-references. |
93 |
|
94 |
Debugging Options
|
|
95 |
-----------------
|
|
96 |
||
97 |
The following options are only useful when developing / debugging Loggerhead |
|
98 |
itself. |
|
99 |
||
100 |
.. cmdoption:: --profile |
|
101 |
||
102 |
Generate per-request callgrind profile data. |
|
103 |
||
104 |
Data for each request is written to a file ``%d-stats.callgrind``,
|
|
105 |
where ``%d`` is replaced by the sequence number of the request.
|
|
106 |
||
107 |
.. cmdoption:: --memory-profile |
|
108 |
||
109 |
Profile the memory usage using the `Dozer |
|
110 |
<http://pypi.python.org/pypi/Dozer>`_ middleware. |
|
111 |
||
112 |
.. cmdoption:: --reload |
|
113 |
||
114 |
Restart the application when any of its python file change. |
|
115 |
||
116 |
This option should only used for development purposes. |