Commit | Line | Data |
9eaaf804 |
1 | NAME |
f3c25197 |
2 | Gitalist - A modern git web viewer |
4534cd82 |
3 | |
9eaaf804 |
4 | SYNOPSIS |
63f34424 |
5 | script/gitalist_server.pl --repo_dir /home/me/code/git |
4534cd82 |
6 | |
b6d010e1 |
7 | INSTALL |
8 | As Gitalist follows the usual Perl module format the usual approach for |
63f34424 |
9 | installation should work e.g. |
b6d010e1 |
10 | |
11 | perl Makefile.PL |
12 | make |
13 | make test |
14 | make install |
15 | |
63f34424 |
16 | or |
17 | |
18 | cpan -i Gitalist |
19 | |
20 | You can also check gitalist out from git and run it, in this case you'll |
21 | additionally need the author modules, but no configuration will be |
22 | needed as it will default to looking for repositories the directory |
23 | above the checkout. |
b6d010e1 |
24 | |
9eaaf804 |
25 | DESCRIPTION |
b6d010e1 |
26 | Gitalist is a web frontend for git repositories based on gitweb.cgi and |
f3c25197 |
27 | backed by Catalyst. |
b6d010e1 |
28 | |
29 | History |
30 | This project started off as an attempt to port gitweb.cgi to a Catalyst |
31 | app in a piecemeal fashion. As it turns out, thanks largely to Florian |
32 | Ragwitz's earlier effort, it was easier to use gitweb.cgi as a template |
33 | for building a new Catalyst application. |
4534cd82 |
34 | |
69175e49 |
35 | GETTING GITALIST |
36 | You can install Gitalist from CPAN in the usual way: |
37 | |
38 | cpan -i Gitalist |
39 | |
40 | Alternatively, you can get Gitalist using git. |
41 | |
42 | The canonical repository for the master branch is: |
43 | |
3d0e045e |
44 | git://git.shadowcat.co.uk/catagits/Gitalist.git |
69175e49 |
45 | |
46 | Gitalist is also mirrored to github, and a number of people have active |
47 | forks with branches and/or new features in the master branch. |
48 | |
ccb79ac8 |
49 | BOOTSTRAPPING |
50 | As of 0.002001 Gitalist can now be bootstrapped to run out of its own |
51 | directory by installing its prerequisites locally with the help of |
52 | local::lib. So instead of installing the prerequisites to the system |
53 | path with CPAN they are installed under the Gitalist directory. |
54 | |
55 | To do this clone Gitalist from the Shadowcat repository mentioned above |
e2c6e7c1 |
56 | or grab a snapshot from broquaint's github repository: |
ccb79ac8 |
57 | |
58 | http://github.com/broquaint/Gitalist/downloads |
59 | |
60 | With the source acquired and unpacked run the following from within the |
61 | Gitalist directory: |
62 | |
e2c6e7c1 |
63 | perl script/bootstrap.pl |
ccb79ac8 |
64 | |
65 | This will install the necessary modules for the build process which in |
66 | turn installs the prerequisites locally. |
67 | |
e2c6e7c1 |
68 | *NB* The relevant bootstrap scripts aren't available in the CPAN dist as |
69 | the bootstrap scripts should not be installed. |
70 | |
69175e49 |
71 | INITIAL CONFIGURATION |
72 | Gitalist is configured using Catalyst::Plugin::Configloader. The |
73 | supplied sample configuration is in Config::General format, however it |
74 | is possible to configure Gitalist using other config file formats (such |
75 | as YAML) if you prefer. |
76 | |
77 | WHEN CHECKING GITALIST OUT OF GIT |
78 | Gitalist from git includes a minimal "gitalist_local.conf", which sets |
79 | the repository directory to one directory higher than the Gitalist |
80 | repository. |
81 | |
82 | This means that if you check Gitalist out next to your other git |
83 | checkouts, then starting the demo server needs no parameters at all: |
84 | |
85 | Gitalist [master]$ ./script/gitalist_server.pl |
86 | You can connect to your server at http://localhost:3000 |
87 | |
88 | FOR CPAN INSTALLS |
63f34424 |
89 | Gitalist can be supplied with a config file by setting the |
90 | "GITALIST_CONFIG" environment variable to point to a configuration file. |
91 | |
69175e49 |
92 | If you install Gitalist from CPAN, a default configuration is installed |
93 | along with gitalist, which is complete except for a repository |
94 | directory. You can get a copy of this configuration by running: |
63f34424 |
95 | |
96 | cp `perl -Ilib -MGitalist -e'print Gitalist->path_to("gitalist.conf")'` gitalist.conf |
97 | |
3d0e045e |
98 | You can then edit this confg, adding a repo_dir path and customising |
69175e49 |
99 | other settings as desired. |
100 | |
101 | You can then start the Gitalist demo server by setting |
102 | "GITALIST_CONFIG". For example: |
103 | |
104 | GITALIST_CONFIG=/usr/local/etc/gitalist.conf gitalist_server.pl |
63f34424 |
105 | |
106 | Alternatively, if you only want to set a repository directory and are |
107 | otherwise happy with the default configuration, then you can set the |
3d0e045e |
108 | "GITALIST_REPO_DIR" environment variable, or pass the "--repo_dir" flag |
109 | to any of the scripts. |
63f34424 |
110 | |
3d0e045e |
111 | GITALIST_REPO_DIR=/home/myuser/code/git gitalist_server.pl |
112 | gitalist_server.pl --repo_dir home/myuser/code/git |
69175e49 |
113 | |
3d0e045e |
114 | The "GITALIST_REPO_DIR" environment variable will override the |
63f34424 |
115 | repository directory set in configuration, and will itself be overridden |
3d0e045e |
116 | by he "--repo_dir" flag. |
63f34424 |
117 | |
69175e49 |
118 | RUNNING |
119 | Once you have followed the instructions above to install and configure |
120 | Gitalist, you may want to run it in a more production facing environment |
121 | than using the single threaded developement server. |
122 | |
123 | The recommended deployment method for Gitalist is FastCGI, although |
124 | Gitalist can also be run under mod_perl or as pure perl with |
125 | Catalyst::Engine::PreFork. |
126 | |
127 | Assuming that you have installed Gitalist's dependencies into a |
128 | local::lib, and you are running from a git checkout, adding a trivial |
129 | FCGI script as "script/gitalist.fcgi" (this file is specifically in |
130 | ".gitignore" so you can have your own copy): |
131 | |
132 | #!/bin/sh |
69175e49 |
133 | exec /home/t0m/public_html/Gitalist/script/gitalist_fastcgi.pl |
2e05129a |
134 | |
69175e49 |
135 | This example can be seen live here: |
136 | |
2e05129a |
137 | http://example.gitalist.com |
138 | |
139 | FASTCGI |
140 | Running Gitalist in FastCGI mode requires a webserver with FastCGI |
141 | support (such as apache with mod_fcgi or fcgid). Below is a sample configuration using Apache2 with fcgid in a |
142 | dynamic configuration (as opposed to static or standalone mode). More information on these modes and |
143 | their configuration can be found at |
144 | http://search.cpan.org/~bobtfish/Catalyst-Runtime-5.80025/lib/Catalyst/Engine/FastCGI.pm#Standalone_server_mode |
145 | |
146 | In Apache's mime.conf, add AddHandler fcgid-script .fcgi (or AddHandler fastcgi-script .fcgi for mod_fcgi) |
147 | |
148 | And a quick VirtualHost configuration: |
149 | |
150 | <VirtualHost *:80> |
151 | ServerName gitalist.yourdomain.com |
152 | DocumentRoot /path/to/gitalist.fcgi |
153 | <Directory "/path/to/gitalist.fcgi"> |
154 | AllowOverride all |
155 | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch |
156 | Order allow,deny |
157 | Allow from all |
158 | </Directory> |
159 | |
160 | # Tell Apache this is a FastCGI application |
161 | <Files gitalist.fcgi> |
162 | #change the below to fastcgi-script if using mod_fcgi |
163 | SetHandler fcgid-script |
164 | </Files> |
165 | </VirtualHost> |
166 | |
167 | Now to access your gitalist instance, you'll go to gitalist.yourdomain.com/gitalist.fcgi/ |
168 | (DO NOT FORGET THAT TRAILING /). If you'd like a different URL, of course, you'll likely want to use |
169 | mod_rewrite or equivalent |
6529de76 |
170 | |
171 | If you find the need to do some troubleshooting, you can call http://url_to_gitalist.fcgi?dump_info=1 |
172 | and/or add export GITALIST_DEBUG=1 to the top of you gitalist.fcgi file (just below the shebang line). |
2e05129a |
173 | |
69175e49 |
174 | |
175 | CONTRIBUTING |
176 | Patches are welcome, please feel free to fork on github and send pull |
177 | requests, send patches from git format-patch to the bug tracker, or host |
178 | your own copy of gitalist somewhere and ask us to pull from it. |
179 | |
180 | SUPPORT |
181 | Gitalist has an active irc community in "#gitalist" on irc.perl.org, |
182 | please feel free to stop by and ask questions, report bugs or |
183 | installation issues or generally for a chat about where we plan to go |
184 | with the project. |
185 | |
9eaaf804 |
186 | SEE ALSO |
b6d010e1 |
187 | Gitalist::Controller::Root |
188 | |
44a9ed75 |
189 | Gitalist::Git::Repository |
b6d010e1 |
190 | |
191 | Catalyst |
8927fe98 |
192 | |
9eaaf804 |
193 | AUTHORS AND COPYRIGHT |
194 | Catalyst application: |
b6d010e1 |
195 | (C) 2009 Venda Ltd and Dan Brook <broq@cpan.org> |
196 | (C) 2009, Tom Doran <bobtfish@bobtfish.net> |
197 | (C) 2009, Zac Stevens <zts@cryptocracy.com> |
8927fe98 |
198 | |
9eaaf804 |
199 | Original gitweb.cgi from which this was derived: |
200 | (C) 2005-2006, Kay Sievers <kay.sievers@vrfy.org> |
201 | (C) 2005, Christian Gierke |
8927fe98 |
202 | |
b6d010e1 |
203 | Model based on http://github.com/rafl/gitweb |
204 | (C) 2008, Florian Ragwitz |
4534cd82 |
205 | |
b6d010e1 |
206 | LICENSE |
207 | Licensed under GNU GPL v2 |
4534cd82 |
208 | |