##// END OF EJS Templates
Change bitbucket and hosting URL
Bradley M. Kuhn -
r4179:010e9532 kallithea-2.2.5-r...
parent child Browse files
Show More
@@ -1,180 +1,176 b''
1 =========
1 =========
2 RhodeCode
2 RhodeCode
3 =========
3 =========
4
4
5 About
5 About
6 -----
6 -----
7
7
8 ``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
8 ``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
9 with a built in push/pull server, full text search and code-review.
9 with a built in push/pull server, full text search and code-review.
10 It works on http/https and has a built in permission/authentication system with
10 It works on http/https and has a built in permission/authentication system with
11 the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
11 the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
12 simple API so it's easy integrable with existing external systems.
12 simple API so it's easy integrable with existing external systems.
13
13
14 RhodeCode is similar in some respects to github_ or bitbucket_,
14 RhodeCode is similar in some respects to github_ or bitbucket_,
15 however RhodeCode can be run as standalone hosted application on your own server.
15 however RhodeCode can be run as standalone hosted application on your own server.
16 It is open source and donation ware and focuses more on providing a customized,
16 It is open source and donation ware and focuses more on providing a customized,
17 self administered interface for Mercurial_ and GIT_ repositories.
17 self administered interface for Mercurial_ and GIT_ repositories.
18 RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
18 RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
19 that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
19 that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
20 different version control systems.
20 different version control systems.
21
21
22 RhodeCode uses `PEP386 versioning <http://www.python.org/dev/peps/pep-0386/>`_
22 RhodeCode uses `PEP386 versioning <http://www.python.org/dev/peps/pep-0386/>`_
23
23
24 Installation
24 Installation
25 ------------
25 ------------
26 Stable releases of RhodeCode are best installed via::
26 Stable releases of RhodeCode are best installed via::
27
27
28 easy_install rhodecode
28 easy_install rhodecode
29
29
30 Or::
30 Or::
31
31
32 pip install rhodecode
32 pip install rhodecode
33
33
34 Detailed instructions and links may be found on the Installation page.
34 Detailed instructions and links may be found on the Installation page.
35
35
36 Please visit http://packages.python.org/RhodeCode/installation.html for
36 Please visit http://packages.python.org/RhodeCode/installation.html for
37 more details
37 more details
38
38
39 RhodeCode demo
39 RhodeCode demo
40 --------------
40 --------------
41
41
42 http://demo.rhodecode.org
42 http://demo.rhodecode.org
43
43
44 The default access is anonymous but you can login to an administrative account
44 The default access is anonymous but you can login to an administrative account
45 using the following credentials:
45 using the following credentials:
46
46
47 - username: demo
47 - username: demo
48 - password: demo12
48 - password: demo12
49
49
50 Source code
50 Source code
51 -----------
51 -----------
52
52
53 The latest sources can be obtained from official RhodeCode instance
53 The latest sources can be obtained from https://kallithea-scm.org/repos/kallithea
54 https://secure.rhodecode.org
55
54
56
55
57 MIRRORS:
56 MIRRORS:
58
57
59 Issue tracker and sources at bitbucket_
58 Issue tracker and sources at bitbucket_
60
59
61 http://bitbucket.org/marcinkuzminski/rhodecode
60 https://bitbucket.org/conservancy/kallithea
62
61
63 Sources at github_
64
65 https://github.com/marcinkuzminski/rhodecode
66
62
67
63
68 RhodeCode Features
64 RhodeCode Features
69 ------------------
65 ------------------
70
66
71 - Has its own middleware to handle mercurial_ and git_ protocol requests.
67 - Has its own middleware to handle mercurial_ and git_ protocol requests.
72 Each request is authenticated and logged together with IP address.
68 Each request is authenticated and logged together with IP address.
73 - Build for speed and performance. You can make multiple pulls/pushes simultaneous.
69 - Build for speed and performance. You can make multiple pulls/pushes simultaneous.
74 Proven to work with 1000s of repositories and users
70 Proven to work with 1000s of repositories and users
75 - Supports http/https, LDAP, AD, proxy-pass authentication.
71 - Supports http/https, LDAP, AD, proxy-pass authentication.
76 - Full permissions (private/read/write/admin) together with IP restrictions for each repository,
72 - Full permissions (private/read/write/admin) together with IP restrictions for each repository,
77 additional explicit forking, repositories group and repository creation permissions.
73 additional explicit forking, repositories group and repository creation permissions.
78 - User groups for easier permission management.
74 - User groups for easier permission management.
79 - Repository groups let you group repos and manage them easier. They come with
75 - Repository groups let you group repos and manage them easier. They come with
80 permission delegation features, so you can delegate groups management.
76 permission delegation features, so you can delegate groups management.
81 - Users can fork other users repos, and compare them at any time.
77 - Users can fork other users repos, and compare them at any time.
82 - Built in Gist functionality for sharing code snippets.
78 - Built in Gist functionality for sharing code snippets.
83 - Integrates easily with other systems, with custom created mappers you can connect it to almost
79 - Integrates easily with other systems, with custom created mappers you can connect it to almost
84 any issue tracker, and with an JSON-RPC API you can make much more
80 any issue tracker, and with an JSON-RPC API you can make much more
85 - Build in commit-api let's you add, edit and commit files right from RhodeCode
81 - Build in commit-api let's you add, edit and commit files right from RhodeCode
86 web interface using simple editor or upload binary files using simple form.
82 web interface using simple editor or upload binary files using simple form.
87 - Powerfull pull-request driven review system with inline commenting,
83 - Powerfull pull-request driven review system with inline commenting,
88 changeset statuses, and notification system.
84 changeset statuses, and notification system.
89 - Importing and syncing repositories from remote locations for GIT_, Mercurial_ and SVN.
85 - Importing and syncing repositories from remote locations for GIT_, Mercurial_ and SVN.
90 - Mako templates let's you customize the look and feel of the application.
86 - Mako templates let's you customize the look and feel of the application.
91 - Beautiful diffs, annotations and source code browsing all colored by pygments.
87 - Beautiful diffs, annotations and source code browsing all colored by pygments.
92 Raw diffs are made in git-diff format for both VCS systems, including GIT_ binary-patches
88 Raw diffs are made in git-diff format for both VCS systems, including GIT_ binary-patches
93 - Mercurial_ and Git_ DAG graphs and yui-flot powered graphs with zooming and statistics
89 - Mercurial_ and Git_ DAG graphs and yui-flot powered graphs with zooming and statistics
94 to track activity for repositories
90 to track activity for repositories
95 - Admin interface with user/permission management. Admin activity journal, logs
91 - Admin interface with user/permission management. Admin activity journal, logs
96 pulls, pushes, forks, registrations and other actions made by all users.
92 pulls, pushes, forks, registrations and other actions made by all users.
97 - Server side forks. It is possible to fork a project and modify it freely
93 - Server side forks. It is possible to fork a project and modify it freely
98 without breaking the main repository.
94 without breaking the main repository.
99 - rst and markdown README support for repositories.
95 - rst and markdown README support for repositories.
100 - Full text search powered by Whoosh on the source files, commit messages, and file names.
96 - Full text search powered by Whoosh on the source files, commit messages, and file names.
101 Build in indexing daemons, with optional incremental index build
97 Build in indexing daemons, with optional incremental index build
102 (no external search servers required all in one application)
98 (no external search servers required all in one application)
103 - Setup project descriptions/tags and info inside built in db for easy, non
99 - Setup project descriptions/tags and info inside built in db for easy, non
104 file-system operations.
100 file-system operations.
105 - Intelligent cache with invalidation after push or project change, provides
101 - Intelligent cache with invalidation after push or project change, provides
106 high performance and always up to date data.
102 high performance and always up to date data.
107 - RSS / Atom feeds, gravatar support, downloadable sources as zip/tar/gz
103 - RSS / Atom feeds, gravatar support, downloadable sources as zip/tar/gz
108 - Optional async tasks for speed and performance using celery_
104 - Optional async tasks for speed and performance using celery_
109 - Backup scripts can do backup of whole app and send it over scp to desired
105 - Backup scripts can do backup of whole app and send it over scp to desired
110 location
106 location
111 - Based on pylons / sqlalchemy / sqlite / whoosh / vcs
107 - Based on pylons / sqlalchemy / sqlite / whoosh / vcs
112
108
113
109
114 Incoming / Plans
110 Incoming / Plans
115 ----------------
111 ----------------
116
112
117 - Finer granular permissions per branch, or subrepo
113 - Finer granular permissions per branch, or subrepo
118 - Web based merges for pull requests
114 - Web based merges for pull requests
119 - Tracking history for each lines in files
115 - Tracking history for each lines in files
120 - Simple issue tracker
116 - Simple issue tracker
121 - SSH based authentication with server side key management
117 - SSH based authentication with server side key management
122 - Commit based built in wiki system
118 - Commit based built in wiki system
123 - More statistics and graph (global annotation + some more statistics)
119 - More statistics and graph (global annotation + some more statistics)
124 - Other advancements as development continues (or you can of course make
120 - Other advancements as development continues (or you can of course make
125 additions and or requests)
121 additions and or requests)
126
122
127 License
123 License
128 -------
124 -------
129
125
130 ``RhodeCode`` is released under the GPLv3 license.
126 ``RhodeCode`` is released under the GPLv3 license.
131
127
132
128
133 Getting help
129 Getting help
134 ------------
130 ------------
135
131
136 Listed bellow are various support resources that should help.
132 Listed bellow are various support resources that should help.
137
133
138 .. note::
134 .. note::
139
135
140 Please try to read the documentation before posting any issues, especially
136 Please try to read the documentation before posting any issues, especially
141 the **troubleshooting section**
137 the **troubleshooting section**
142
138
143 - Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
139 - Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
144 any questions.
140 any questions.
145
141
146 - Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
142 - Open an issue at `issue tracker <https://bitbucket.org/conservancy/kallithea/issues>`_
147
143
148 - Join #rhodecode on FreeNode (irc.freenode.net)
144 - Join #rhodecode on FreeNode (irc.freenode.net)
149 or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
145 or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
150
146
151 - You can also follow me on twitter **@marcinkuzminski** where i often post some
147 - You can also follow me on twitter **@marcinkuzminski** where i often post some
152 news about RhodeCode
148 news about RhodeCode
153
149
154
150
155 Online documentation
151 Online documentation
156 --------------------
152 --------------------
157
153
158 Online documentation for the current version of RhodeCode is available at
154 Online documentation for the current version of RhodeCode is available at
159 - http://packages.python.org/RhodeCode/
155 - http://packages.python.org/RhodeCode/
160 - http://rhodecode.readthedocs.org/en/latest/index.html
156 - http://rhodecode.readthedocs.org/en/latest/index.html
161
157
162 You may also build the documentation for yourself - go into ``docs/`` and run::
158 You may also build the documentation for yourself - go into ``docs/`` and run::
163
159
164 make html
160 make html
165
161
166 (You need to have sphinx_ installed to build the documentation. If you don't
162 (You need to have sphinx_ installed to build the documentation. If you don't
167 have sphinx_ installed you can install it via the command:
163 have sphinx_ installed you can install it via the command:
168 ``easy_install sphinx``)
164 ``easy_install sphinx``)
169
165
170 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
166 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
171 .. _python: http://www.python.org/
167 .. _python: http://www.python.org/
172 .. _sphinx: http://sphinx.pocoo.org/
168 .. _sphinx: http://sphinx.pocoo.org/
173 .. _mercurial: http://mercurial.selenic.com/
169 .. _mercurial: http://mercurial.selenic.com/
174 .. _bitbucket: http://bitbucket.org/
170 .. _bitbucket: http://bitbucket.org/
175 .. _github: http://github.com/
171 .. _github: http://github.com/
176 .. _subversion: http://subversion.tigris.org/
172 .. _subversion: http://subversion.tigris.org/
177 .. _git: http://git-scm.com/
173 .. _git: http://git-scm.com/
178 .. _celery: http://celeryproject.org/
174 .. _celery: http://celeryproject.org/
179 .. _Sphinx: http://sphinx.pocoo.org/
175 .. _Sphinx: http://sphinx.pocoo.org/
180 .. _vcs: http://pypi.python.org/pypi/vcs
176 .. _vcs: http://pypi.python.org/pypi/vcs
@@ -1,588 +1,588 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
21
21
22 #smtp_server = mail.server.com
22 #smtp_server = mail.server.com
23 #smtp_username =
23 #smtp_username =
24 #smtp_password =
24 #smtp_password =
25 #smtp_port =
25 #smtp_port =
26 #smtp_use_tls = false
26 #smtp_use_tls = false
27 #smtp_use_ssl = true
27 #smtp_use_ssl = true
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE ##
32 ## PASTE ##
33 #use = egg:Paste#http
33 #use = egg:Paste#http
34 ## nr of worker threads to spawn
34 ## nr of worker threads to spawn
35 #threadpool_workers = 5
35 #threadpool_workers = 5
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38 ## option to use threads of process
38 ## option to use threads of process
39 #use_threadpool = true
39 #use_threadpool = true
40
40
41 ## WAITRESS ##
41 ## WAITRESS ##
42 use = egg:waitress#main
42 use = egg:waitress#main
43 ## number of worker threads
43 ## number of worker threads
44 threads = 5
44 threads = 5
45 ## MAX BODY SIZE 100GB
45 ## MAX BODY SIZE 100GB
46 max_request_body_size = 107374182400
46 max_request_body_size = 107374182400
47 ## use poll instead of select, fixes fd limits, may not work on old
47 ## use poll instead of select, fixes fd limits, may not work on old
48 ## windows systems.
48 ## windows systems.
49 #asyncore_use_poll = True
49 #asyncore_use_poll = True
50
50
51 ## GUNICORN ##
51 ## GUNICORN ##
52 #use = egg:gunicorn#main
52 #use = egg:gunicorn#main
53 ## number of process workers. You must set `instance_id = *` when this option
53 ## number of process workers. You must set `instance_id = *` when this option
54 ## is set to more than one worker
54 ## is set to more than one worker
55 #workers = 1
55 #workers = 1
56 ## process name
56 ## process name
57 #proc_name = rhodecode
57 #proc_name = rhodecode
58 ## type of worker class, one of sync, eventlet, gevent, tornado
58 ## type of worker class, one of sync, eventlet, gevent, tornado
59 ## recommended for bigger setup is using of of other than sync one
59 ## recommended for bigger setup is using of of other than sync one
60 #worker_class = sync
60 #worker_class = sync
61 #max_requests = 5
61 #max_requests = 5
62 ## ammount of time a worker can handle request before it gets killed and
62 ## ammount of time a worker can handle request before it gets killed and
63 ## restarted
63 ## restarted
64 #timeout = 3600
64 #timeout = 3600
65
65
66 ## UWSGI ##
66 ## UWSGI ##
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
68 #[uwsgi]
68 #[uwsgi]
69 #socket = /tmp/uwsgi.sock
69 #socket = /tmp/uwsgi.sock
70 #master = true
70 #master = true
71 #http = 0.0.0.0:5000
71 #http = 0.0.0.0:5000
72
72
73 ## set as deamon and redirect all output to file
73 ## set as deamon and redirect all output to file
74 #daemonize = ./uwsgi_rhodecode.log
74 #daemonize = ./uwsgi_rhodecode.log
75
75
76 ## master process PID
76 ## master process PID
77 #pidfile = ./uwsgi_rhodecode.pid
77 #pidfile = ./uwsgi_rhodecode.pid
78
78
79 ## stats server with workers statistics, use uwsgitop
79 ## stats server with workers statistics, use uwsgitop
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
81 #stats = 127.0.0.1:1717
81 #stats = 127.0.0.1:1717
82 #memory-report = true
82 #memory-report = true
83
83
84 ## log 5XX errors
84 ## log 5XX errors
85 #log-5xx = true
85 #log-5xx = true
86
86
87 ## Set the socket listen queue size.
87 ## Set the socket listen queue size.
88 #listen = 256
88 #listen = 256
89
89
90 ## Gracefully Reload workers after the specified amount of managed requests
90 ## Gracefully Reload workers after the specified amount of managed requests
91 ## (avoid memory leaks).
91 ## (avoid memory leaks).
92 #max-requests = 1000
92 #max-requests = 1000
93
93
94 ## enable large buffers
94 ## enable large buffers
95 #buffer-size=65535
95 #buffer-size=65535
96
96
97 ## socket and http timeouts ##
97 ## socket and http timeouts ##
98 #http-timeout=3600
98 #http-timeout=3600
99 #socket-timeout=3600
99 #socket-timeout=3600
100
100
101 ## Log requests slower than the specified number of milliseconds.
101 ## Log requests slower than the specified number of milliseconds.
102 #log-slow = 10
102 #log-slow = 10
103
103
104 ## Exit if no app can be loaded.
104 ## Exit if no app can be loaded.
105 #need-app = true
105 #need-app = true
106
106
107 ## Set lazy mode (load apps in workers instead of master).
107 ## Set lazy mode (load apps in workers instead of master).
108 #lazy = true
108 #lazy = true
109
109
110 ## scaling ##
110 ## scaling ##
111 ## set cheaper algorithm to use, if not set default will be used
111 ## set cheaper algorithm to use, if not set default will be used
112 #cheaper-algo = spare
112 #cheaper-algo = spare
113
113
114 ## minimum number of workers to keep at all times
114 ## minimum number of workers to keep at all times
115 #cheaper = 1
115 #cheaper = 1
116
116
117 ## number of workers to spawn at startup
117 ## number of workers to spawn at startup
118 #cheaper-initial = 1
118 #cheaper-initial = 1
119
119
120 ## maximum number of workers that can be spawned
120 ## maximum number of workers that can be spawned
121 #workers = 4
121 #workers = 4
122
122
123 ## how many workers should be spawned at a time
123 ## how many workers should be spawned at a time
124 #cheaper-step = 1
124 #cheaper-step = 1
125
125
126 ## COMMON ##
126 ## COMMON ##
127 host = 0.0.0.0
127 host = 0.0.0.0
128 port = 5000
128 port = 5000
129
129
130 ## prefix middleware for rc
130 ## prefix middleware for rc
131 #[filter:proxy-prefix]
131 #[filter:proxy-prefix]
132 #use = egg:PasteDeploy#prefix
132 #use = egg:PasteDeploy#prefix
133 #prefix = /<your-prefix>
133 #prefix = /<your-prefix>
134
134
135 [app:main]
135 [app:main]
136 use = egg:rhodecode
136 use = egg:rhodecode
137 ## enable proxy prefix middleware
137 ## enable proxy prefix middleware
138 #filter-with = proxy-prefix
138 #filter-with = proxy-prefix
139
139
140 full_stack = true
140 full_stack = true
141 static_files = true
141 static_files = true
142 ## Optional Languages
142 ## Optional Languages
143 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
143 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
144 lang = en
144 lang = en
145 cache_dir = %(here)s/data
145 cache_dir = %(here)s/data
146 index_dir = %(here)s/data/index
146 index_dir = %(here)s/data/index
147
147
148 ## perform a full repository scan on each server start, this should be
148 ## perform a full repository scan on each server start, this should be
149 ## set to false after first startup, to allow faster server restarts.
149 ## set to false after first startup, to allow faster server restarts.
150 initial_repo_scan = true
150 initial_repo_scan = true
151
151
152 ## uncomment and set this path to use archive download cache
152 ## uncomment and set this path to use archive download cache
153 #archive_cache_dir = /tmp/tarballcache
153 #archive_cache_dir = /tmp/tarballcache
154
154
155 ## change this to unique ID for security
155 ## change this to unique ID for security
156 app_instance_uuid = rc-production
156 app_instance_uuid = rc-production
157
157
158 ## cut off limit for large diffs (size in bytes)
158 ## cut off limit for large diffs (size in bytes)
159 cut_off_limit = 256000
159 cut_off_limit = 256000
160
160
161 ## use cache version of scm repo everywhere
161 ## use cache version of scm repo everywhere
162 vcs_full_cache = true
162 vcs_full_cache = true
163
163
164 ## force https in RhodeCode, fixes https redirects, assumes it's always https
164 ## force https in RhodeCode, fixes https redirects, assumes it's always https
165 force_https = false
165 force_https = false
166
166
167 ## use Strict-Transport-Security headers
167 ## use Strict-Transport-Security headers
168 use_htsts = false
168 use_htsts = false
169
169
170 ## number of commits stats will parse on each iteration
170 ## number of commits stats will parse on each iteration
171 commit_parse_limit = 25
171 commit_parse_limit = 25
172
172
173 ## use gravatar service to display avatars
173 ## use gravatar service to display avatars
174 use_gravatar = true
174 use_gravatar = true
175
175
176 ## path to git executable
176 ## path to git executable
177 git_path = git
177 git_path = git
178
178
179 ## git rev filter option, --all is the default filter, if you need to
179 ## git rev filter option, --all is the default filter, if you need to
180 ## hide all refs in changelog switch this to --branches --tags
180 ## hide all refs in changelog switch this to --branches --tags
181 git_rev_filter=--all
181 git_rev_filter=--all
182
182
183 ## RSS feed options
183 ## RSS feed options
184 rss_cut_off_limit = 256000
184 rss_cut_off_limit = 256000
185 rss_items_per_page = 10
185 rss_items_per_page = 10
186 rss_include_diff = false
186 rss_include_diff = false
187
187
188 ## options for showing and identifying changesets
188 ## options for showing and identifying changesets
189 show_sha_length = 12
189 show_sha_length = 12
190 show_revision_number = true
190 show_revision_number = true
191
191
192 ## gist URL alias, used to create nicer urls for gist. This should be an
192 ## gist URL alias, used to create nicer urls for gist. This should be an
193 ## url that does rewrites to _admin/gists/<gistid>.
193 ## url that does rewrites to _admin/gists/<gistid>.
194 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
194 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
195 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
195 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
196 gist_alias_url =
196 gist_alias_url =
197
197
198 ## white list of API enabled controllers. This allows to add list of
198 ## white list of API enabled controllers. This allows to add list of
199 ## controllers to which access will be enabled by api_key. eg: to enable
199 ## controllers to which access will be enabled by api_key. eg: to enable
200 ## api access to raw_files put `FilesController:raw`, to enable access to patches
200 ## api access to raw_files put `FilesController:raw`, to enable access to patches
201 ## add `ChangesetController:changeset_patch`. This list should be "," separated
201 ## add `ChangesetController:changeset_patch`. This list should be "," separated
202 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
202 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
203 ## Recommended settings bellow are commented out:
203 ## Recommended settings bellow are commented out:
204 api_access_controllers_whitelist =
204 api_access_controllers_whitelist =
205 # ChangesetController:changeset_patch,
205 # ChangesetController:changeset_patch,
206 # ChangesetController:changeset_raw,
206 # ChangesetController:changeset_raw,
207 # FilesController:raw,
207 # FilesController:raw,
208 # FilesController:archivefile
208 # FilesController:archivefile
209
209
210 ## alternative_gravatar_url allows you to use your own avatar server application
210 ## alternative_gravatar_url allows you to use your own avatar server application
211 ## the following parts of the URL will be replaced
211 ## the following parts of the URL will be replaced
212 ## {email} user email
212 ## {email} user email
213 ## {md5email} md5 hash of the user email (like at gravatar.com)
213 ## {md5email} md5 hash of the user email (like at gravatar.com)
214 ## {size} size of the image that is expected from the server application
214 ## {size} size of the image that is expected from the server application
215 ## {scheme} http/https from RhodeCode server
215 ## {scheme} http/https from RhodeCode server
216 ## {netloc} network location from RhodeCode server
216 ## {netloc} network location from RhodeCode server
217 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
217 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
218 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
218 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
219
219
220
220
221 ## container auth options
221 ## container auth options
222 container_auth_enabled = false
222 container_auth_enabled = false
223 proxypass_auth_enabled = false
223 proxypass_auth_enabled = false
224
224
225 ## default encoding used to convert from and to unicode
225 ## default encoding used to convert from and to unicode
226 ## can be also a comma seperated list of encoding in case of mixed encodings
226 ## can be also a comma seperated list of encoding in case of mixed encodings
227 default_encoding = utf8
227 default_encoding = utf8
228
228
229 ## overwrite schema of clone url
229 ## overwrite schema of clone url
230 ## available vars:
230 ## available vars:
231 ## scheme - http/https
231 ## scheme - http/https
232 ## user - current user
232 ## user - current user
233 ## pass - password
233 ## pass - password
234 ## netloc - network location
234 ## netloc - network location
235 ## path - usually repo_name
235 ## path - usually repo_name
236
236
237 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
237 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
238
238
239 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
239 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
240 #bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
240 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
241
241
242 ## issue tracking mapping for commits messages
242 ## issue tracking mapping for commits messages
243 ## comment out issue_pat, issue_server, issue_prefix to enable
243 ## comment out issue_pat, issue_server, issue_prefix to enable
244
244
245 ## pattern to get the issues from commit messages
245 ## pattern to get the issues from commit messages
246 ## default one used here is #<numbers> with a regex passive group for `#`
246 ## default one used here is #<numbers> with a regex passive group for `#`
247 ## {id} will be all groups matched from this pattern
247 ## {id} will be all groups matched from this pattern
248
248
249 issue_pat = (?:\s*#)(\d+)
249 issue_pat = (?:\s*#)(\d+)
250
250
251 ## server url to the issue, each {id} will be replaced with match
251 ## server url to the issue, each {id} will be replaced with match
252 ## fetched from the regex and {repo} is replaced with full repository name
252 ## fetched from the regex and {repo} is replaced with full repository name
253 ## including groups {repo_name} is replaced with just name of repo
253 ## including groups {repo_name} is replaced with just name of repo
254
254
255 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
255 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
256
256
257 ## prefix to add to link to indicate it's an url
257 ## prefix to add to link to indicate it's an url
258 ## #314 will be replaced by <issue_prefix><id>
258 ## #314 will be replaced by <issue_prefix><id>
259
259
260 issue_prefix = #
260 issue_prefix = #
261
261
262 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
262 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
263 ## multiple patterns, to other issues server, wiki or others
263 ## multiple patterns, to other issues server, wiki or others
264 ## below an example how to create a wiki pattern
264 ## below an example how to create a wiki pattern
265 # #wiki-some-id -> https://mywiki.com/some-id
265 # #wiki-some-id -> https://mywiki.com/some-id
266
266
267 #issue_pat_wiki = (?:wiki-)(.+)
267 #issue_pat_wiki = (?:wiki-)(.+)
268 #issue_server_link_wiki = https://mywiki.com/{id}
268 #issue_server_link_wiki = https://mywiki.com/{id}
269 #issue_prefix_wiki = WIKI-
269 #issue_prefix_wiki = WIKI-
270
270
271
271
272 ## instance-id prefix
272 ## instance-id prefix
273 ## a prefix key for this instance used for cache invalidation when running
273 ## a prefix key for this instance used for cache invalidation when running
274 ## multiple instances of rhodecode, make sure it's globally unique for
274 ## multiple instances of rhodecode, make sure it's globally unique for
275 ## all running rhodecode instances. Leave empty if you don't use it
275 ## all running rhodecode instances. Leave empty if you don't use it
276 instance_id =
276 instance_id =
277
277
278 ## alternative return HTTP header for failed authentication. Default HTTP
278 ## alternative return HTTP header for failed authentication. Default HTTP
279 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
279 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
280 ## handling that. Set this variable to 403 to return HTTPForbidden
280 ## handling that. Set this variable to 403 to return HTTPForbidden
281 auth_ret_code =
281 auth_ret_code =
282
282
283 ## locking return code. When repository is locked return this HTTP code. 2XX
283 ## locking return code. When repository is locked return this HTTP code. 2XX
284 ## codes don't break the transactions while 4XX codes do
284 ## codes don't break the transactions while 4XX codes do
285 lock_ret_code = 423
285 lock_ret_code = 423
286
286
287 ## allows to change the repository location in settings page
287 ## allows to change the repository location in settings page
288 allow_repo_location_change = True
288 allow_repo_location_change = True
289
289
290 ## allows to setup custom hooks in settings page
290 ## allows to setup custom hooks in settings page
291 allow_custom_hooks_settings = True
291 allow_custom_hooks_settings = True
292
292
293
293
294 ####################################
294 ####################################
295 ### CELERY CONFIG ####
295 ### CELERY CONFIG ####
296 ####################################
296 ####################################
297 use_celery = false
297 use_celery = false
298 broker.host = localhost
298 broker.host = localhost
299 broker.vhost = rabbitmqhost
299 broker.vhost = rabbitmqhost
300 broker.port = 5672
300 broker.port = 5672
301 broker.user = rabbitmq
301 broker.user = rabbitmq
302 broker.password = qweqwe
302 broker.password = qweqwe
303
303
304 celery.imports = rhodecode.lib.celerylib.tasks
304 celery.imports = rhodecode.lib.celerylib.tasks
305
305
306 celery.result.backend = amqp
306 celery.result.backend = amqp
307 celery.result.dburi = amqp://
307 celery.result.dburi = amqp://
308 celery.result.serialier = json
308 celery.result.serialier = json
309
309
310 #celery.send.task.error.emails = true
310 #celery.send.task.error.emails = true
311 #celery.amqp.task.result.expires = 18000
311 #celery.amqp.task.result.expires = 18000
312
312
313 celeryd.concurrency = 2
313 celeryd.concurrency = 2
314 #celeryd.log.file = celeryd.log
314 #celeryd.log.file = celeryd.log
315 celeryd.log.level = debug
315 celeryd.log.level = debug
316 celeryd.max.tasks.per.child = 1
316 celeryd.max.tasks.per.child = 1
317
317
318 ## tasks will never be sent to the queue, but executed locally instead.
318 ## tasks will never be sent to the queue, but executed locally instead.
319 celery.always.eager = false
319 celery.always.eager = false
320
320
321 ####################################
321 ####################################
322 ### BEAKER CACHE ####
322 ### BEAKER CACHE ####
323 ####################################
323 ####################################
324 beaker.cache.data_dir=%(here)s/data/cache/data
324 beaker.cache.data_dir=%(here)s/data/cache/data
325 beaker.cache.lock_dir=%(here)s/data/cache/lock
325 beaker.cache.lock_dir=%(here)s/data/cache/lock
326
326
327 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
327 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
328
328
329 beaker.cache.super_short_term.type=memory
329 beaker.cache.super_short_term.type=memory
330 beaker.cache.super_short_term.expire=10
330 beaker.cache.super_short_term.expire=10
331 beaker.cache.super_short_term.key_length = 256
331 beaker.cache.super_short_term.key_length = 256
332
332
333 beaker.cache.short_term.type=memory
333 beaker.cache.short_term.type=memory
334 beaker.cache.short_term.expire=60
334 beaker.cache.short_term.expire=60
335 beaker.cache.short_term.key_length = 256
335 beaker.cache.short_term.key_length = 256
336
336
337 beaker.cache.long_term.type=memory
337 beaker.cache.long_term.type=memory
338 beaker.cache.long_term.expire=36000
338 beaker.cache.long_term.expire=36000
339 beaker.cache.long_term.key_length = 256
339 beaker.cache.long_term.key_length = 256
340
340
341 beaker.cache.sql_cache_short.type=memory
341 beaker.cache.sql_cache_short.type=memory
342 beaker.cache.sql_cache_short.expire=10
342 beaker.cache.sql_cache_short.expire=10
343 beaker.cache.sql_cache_short.key_length = 256
343 beaker.cache.sql_cache_short.key_length = 256
344
344
345 beaker.cache.sql_cache_med.type=memory
345 beaker.cache.sql_cache_med.type=memory
346 beaker.cache.sql_cache_med.expire=360
346 beaker.cache.sql_cache_med.expire=360
347 beaker.cache.sql_cache_med.key_length = 256
347 beaker.cache.sql_cache_med.key_length = 256
348
348
349 beaker.cache.sql_cache_long.type=file
349 beaker.cache.sql_cache_long.type=file
350 beaker.cache.sql_cache_long.expire=3600
350 beaker.cache.sql_cache_long.expire=3600
351 beaker.cache.sql_cache_long.key_length = 256
351 beaker.cache.sql_cache_long.key_length = 256
352
352
353 ####################################
353 ####################################
354 ### BEAKER SESSION ####
354 ### BEAKER SESSION ####
355 ####################################
355 ####################################
356 ## Type of storage used for the session, current types are
356 ## Type of storage used for the session, current types are
357 ## dbm, file, memcached, database, and memory.
357 ## dbm, file, memcached, database, and memory.
358 ## The storage uses the Container API
358 ## The storage uses the Container API
359 ## that is also used by the cache system.
359 ## that is also used by the cache system.
360
360
361 ## db session ##
361 ## db session ##
362 #beaker.session.type = ext:database
362 #beaker.session.type = ext:database
363 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
363 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
364 #beaker.session.table_name = db_session
364 #beaker.session.table_name = db_session
365
365
366 ## encrypted cookie client side session, good for many instances ##
366 ## encrypted cookie client side session, good for many instances ##
367 #beaker.session.type = cookie
367 #beaker.session.type = cookie
368
368
369 ## file based cookies (default) ##
369 ## file based cookies (default) ##
370 #beaker.session.type = file
370 #beaker.session.type = file
371
371
372 beaker.session.key = rhodecode
372 beaker.session.key = rhodecode
373 beaker.session.secret = develop-rc-uytcxaz
373 beaker.session.secret = develop-rc-uytcxaz
374
374
375 ## Secure encrypted cookie. Requires AES and AES python libraries
375 ## Secure encrypted cookie. Requires AES and AES python libraries
376 ## you must disable beaker.session.secret to use this
376 ## you must disable beaker.session.secret to use this
377 #beaker.session.encrypt_key = <key_for_encryption>
377 #beaker.session.encrypt_key = <key_for_encryption>
378 #beaker.session.validate_key = <validation_key>
378 #beaker.session.validate_key = <validation_key>
379
379
380 ## sets session as invalid if it haven't been accessed for given amount of time
380 ## sets session as invalid if it haven't been accessed for given amount of time
381 beaker.session.timeout = 2592000
381 beaker.session.timeout = 2592000
382 beaker.session.httponly = true
382 beaker.session.httponly = true
383 #beaker.session.cookie_path = /<your-prefix>
383 #beaker.session.cookie_path = /<your-prefix>
384
384
385 ## uncomment for https secure cookie
385 ## uncomment for https secure cookie
386 beaker.session.secure = false
386 beaker.session.secure = false
387
387
388 ## auto save the session to not to use .save()
388 ## auto save the session to not to use .save()
389 beaker.session.auto = False
389 beaker.session.auto = False
390
390
391 ## default cookie expiration time in seconds `true` expire at browser close ##
391 ## default cookie expiration time in seconds `true` expire at browser close ##
392 #beaker.session.cookie_expires = 3600
392 #beaker.session.cookie_expires = 3600
393
393
394
394
395 ############################
395 ############################
396 ## ERROR HANDLING SYSTEMS ##
396 ## ERROR HANDLING SYSTEMS ##
397 ############################
397 ############################
398
398
399 ####################
399 ####################
400 ### [errormator] ###
400 ### [errormator] ###
401 ####################
401 ####################
402
402
403 ## Errormator is tailored to work with RhodeCode, see
403 ## Errormator is tailored to work with RhodeCode, see
404 ## http://errormator.com for details how to obtain an account
404 ## http://errormator.com for details how to obtain an account
405 ## you must install python package `errormator_client` to make it work
405 ## you must install python package `errormator_client` to make it work
406
406
407 ## errormator enabled
407 ## errormator enabled
408 errormator = false
408 errormator = false
409
409
410 errormator.server_url = https://api.errormator.com
410 errormator.server_url = https://api.errormator.com
411 errormator.api_key = YOUR_API_KEY
411 errormator.api_key = YOUR_API_KEY
412
412
413 ## TWEAK AMOUNT OF INFO SENT HERE
413 ## TWEAK AMOUNT OF INFO SENT HERE
414
414
415 ## enables 404 error logging (default False)
415 ## enables 404 error logging (default False)
416 errormator.report_404 = false
416 errormator.report_404 = false
417
417
418 ## time in seconds after request is considered being slow (default 1)
418 ## time in seconds after request is considered being slow (default 1)
419 errormator.slow_request_time = 1
419 errormator.slow_request_time = 1
420
420
421 ## record slow requests in application
421 ## record slow requests in application
422 ## (needs to be enabled for slow datastore recording and time tracking)
422 ## (needs to be enabled for slow datastore recording and time tracking)
423 errormator.slow_requests = true
423 errormator.slow_requests = true
424
424
425 ## enable hooking to application loggers
425 ## enable hooking to application loggers
426 # errormator.logging = true
426 # errormator.logging = true
427
427
428 ## minimum log level for log capture
428 ## minimum log level for log capture
429 # errormator.logging.level = WARNING
429 # errormator.logging.level = WARNING
430
430
431 ## send logs only from erroneous/slow requests
431 ## send logs only from erroneous/slow requests
432 ## (saves API quota for intensive logging)
432 ## (saves API quota for intensive logging)
433 errormator.logging_on_error = false
433 errormator.logging_on_error = false
434
434
435 ## list of additonal keywords that should be grabbed from environ object
435 ## list of additonal keywords that should be grabbed from environ object
436 ## can be string with comma separated list of words in lowercase
436 ## can be string with comma separated list of words in lowercase
437 ## (by default client will always send following info:
437 ## (by default client will always send following info:
438 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
438 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
439 ## start with HTTP* this list be extended with additional keywords here
439 ## start with HTTP* this list be extended with additional keywords here
440 errormator.environ_keys_whitelist =
440 errormator.environ_keys_whitelist =
441
441
442
442
443 ## list of keywords that should be blanked from request object
443 ## list of keywords that should be blanked from request object
444 ## can be string with comma separated list of words in lowercase
444 ## can be string with comma separated list of words in lowercase
445 ## (by default client will always blank keys that contain following words
445 ## (by default client will always blank keys that contain following words
446 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
446 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
447 ## this list be extended with additional keywords set here
447 ## this list be extended with additional keywords set here
448 errormator.request_keys_blacklist =
448 errormator.request_keys_blacklist =
449
449
450
450
451 ## list of namespaces that should be ignores when gathering log entries
451 ## list of namespaces that should be ignores when gathering log entries
452 ## can be string with comma separated list of namespaces
452 ## can be string with comma separated list of namespaces
453 ## (by default the client ignores own entries: errormator_client.client)
453 ## (by default the client ignores own entries: errormator_client.client)
454 errormator.log_namespace_blacklist =
454 errormator.log_namespace_blacklist =
455
455
456
456
457 ################
457 ################
458 ### [sentry] ###
458 ### [sentry] ###
459 ################
459 ################
460
460
461 ## sentry is a alternative open source error aggregator
461 ## sentry is a alternative open source error aggregator
462 ## you must install python packages `sentry` and `raven` to enable
462 ## you must install python packages `sentry` and `raven` to enable
463
463
464 sentry.dsn = YOUR_DNS
464 sentry.dsn = YOUR_DNS
465 sentry.servers =
465 sentry.servers =
466 sentry.name =
466 sentry.name =
467 sentry.key =
467 sentry.key =
468 sentry.public_key =
468 sentry.public_key =
469 sentry.secret_key =
469 sentry.secret_key =
470 sentry.project =
470 sentry.project =
471 sentry.site =
471 sentry.site =
472 sentry.include_paths =
472 sentry.include_paths =
473 sentry.exclude_paths =
473 sentry.exclude_paths =
474
474
475
475
476 ################################################################################
476 ################################################################################
477 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
477 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
478 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
478 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
479 ## execute malicious code after an exception is raised. ##
479 ## execute malicious code after an exception is raised. ##
480 ################################################################################
480 ################################################################################
481 #set debug = false
481 #set debug = false
482
482
483 ##################################
483 ##################################
484 ### LOGVIEW CONFIG ###
484 ### LOGVIEW CONFIG ###
485 ##################################
485 ##################################
486 logview.sqlalchemy = #faa
486 logview.sqlalchemy = #faa
487 logview.pylons.templating = #bfb
487 logview.pylons.templating = #bfb
488 logview.pylons.util = #eee
488 logview.pylons.util = #eee
489
489
490 #########################################################
490 #########################################################
491 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
491 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
492 #########################################################
492 #########################################################
493 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
493 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
494 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
494 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
495 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
495 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
496 sqlalchemy.db1.echo = false
496 sqlalchemy.db1.echo = false
497 sqlalchemy.db1.pool_recycle = 3600
497 sqlalchemy.db1.pool_recycle = 3600
498 sqlalchemy.db1.convert_unicode = true
498 sqlalchemy.db1.convert_unicode = true
499
499
500 ################################
500 ################################
501 ### LOGGING CONFIGURATION ####
501 ### LOGGING CONFIGURATION ####
502 ################################
502 ################################
503 [loggers]
503 [loggers]
504 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
504 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
505
505
506 [handlers]
506 [handlers]
507 keys = console, console_sql
507 keys = console, console_sql
508
508
509 [formatters]
509 [formatters]
510 keys = generic, color_formatter, color_formatter_sql
510 keys = generic, color_formatter, color_formatter_sql
511
511
512 #############
512 #############
513 ## LOGGERS ##
513 ## LOGGERS ##
514 #############
514 #############
515 [logger_root]
515 [logger_root]
516 level = NOTSET
516 level = NOTSET
517 handlers = console
517 handlers = console
518
518
519 [logger_routes]
519 [logger_routes]
520 level = DEBUG
520 level = DEBUG
521 handlers =
521 handlers =
522 qualname = routes.middleware
522 qualname = routes.middleware
523 ## "level = DEBUG" logs the route matched and routing variables.
523 ## "level = DEBUG" logs the route matched and routing variables.
524 propagate = 1
524 propagate = 1
525
525
526 [logger_beaker]
526 [logger_beaker]
527 level = DEBUG
527 level = DEBUG
528 handlers =
528 handlers =
529 qualname = beaker.container
529 qualname = beaker.container
530 propagate = 1
530 propagate = 1
531
531
532 [logger_templates]
532 [logger_templates]
533 level = INFO
533 level = INFO
534 handlers =
534 handlers =
535 qualname = pylons.templating
535 qualname = pylons.templating
536 propagate = 1
536 propagate = 1
537
537
538 [logger_rhodecode]
538 [logger_rhodecode]
539 level = DEBUG
539 level = DEBUG
540 handlers =
540 handlers =
541 qualname = rhodecode
541 qualname = rhodecode
542 propagate = 1
542 propagate = 1
543
543
544 [logger_sqlalchemy]
544 [logger_sqlalchemy]
545 level = INFO
545 level = INFO
546 handlers = console_sql
546 handlers = console_sql
547 qualname = sqlalchemy.engine
547 qualname = sqlalchemy.engine
548 propagate = 0
548 propagate = 0
549
549
550 [logger_whoosh_indexer]
550 [logger_whoosh_indexer]
551 level = DEBUG
551 level = DEBUG
552 handlers =
552 handlers =
553 qualname = whoosh_indexer
553 qualname = whoosh_indexer
554 propagate = 1
554 propagate = 1
555
555
556 ##############
556 ##############
557 ## HANDLERS ##
557 ## HANDLERS ##
558 ##############
558 ##############
559
559
560 [handler_console]
560 [handler_console]
561 class = StreamHandler
561 class = StreamHandler
562 args = (sys.stderr,)
562 args = (sys.stderr,)
563 level = DEBUG
563 level = DEBUG
564 formatter = color_formatter
564 formatter = color_formatter
565
565
566 [handler_console_sql]
566 [handler_console_sql]
567 class = StreamHandler
567 class = StreamHandler
568 args = (sys.stderr,)
568 args = (sys.stderr,)
569 level = DEBUG
569 level = DEBUG
570 formatter = color_formatter_sql
570 formatter = color_formatter_sql
571
571
572 ################
572 ################
573 ## FORMATTERS ##
573 ## FORMATTERS ##
574 ################
574 ################
575
575
576 [formatter_generic]
576 [formatter_generic]
577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
578 datefmt = %Y-%m-%d %H:%M:%S
578 datefmt = %Y-%m-%d %H:%M:%S
579
579
580 [formatter_color_formatter]
580 [formatter_color_formatter]
581 class=rhodecode.lib.colored_formatter.ColorFormatter
581 class=rhodecode.lib.colored_formatter.ColorFormatter
582 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
582 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
583 datefmt = %Y-%m-%d %H:%M:%S
583 datefmt = %Y-%m-%d %H:%M:%S
584
584
585 [formatter_color_formatter_sql]
585 [formatter_color_formatter_sql]
586 class=rhodecode.lib.colored_formatter.ColorFormatterSql
586 class=rhodecode.lib.colored_formatter.ColorFormatterSql
587 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
587 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
588 datefmt = %Y-%m-%d %H:%M:%S
588 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,53 +1,53 b''
1 .. _contributing:
1 .. _contributing:
2
2
3 =========================
3 =========================
4 Contributing to RhodeCode
4 Contributing to RhodeCode
5 =========================
5 =========================
6
6
7 If you would like to contribute to RhodeCode, please contact me, any help is
7 If you would like to contribute to RhodeCode, please contact me, any help is
8 greatly appreciated!
8 greatly appreciated!
9
9
10 Could I request that you make your source contributions by first forking the
10 Could I request that you make your source contributions by first forking the
11 RhodeCode repository on bitbucket_
11 RhodeCode repository on bitbucket_
12 https://bitbucket.org/marcinkuzminski/rhodecode and then make your changes to
12 https://bitbucket.org/conservancy/kallithea and then make your changes to
13 your forked repository. Please post all fixes into **dev** bookmark since your
13 your forked repository. Please post all fixes into **dev** bookmark since your
14 change might be already fixed there and i try to merge all fixes from dev into
14 change might be already fixed there and i try to merge all fixes from dev into
15 stable, and not the other way. Finally, when you are finished with your changes,
15 stable, and not the other way. Finally, when you are finished with your changes,
16 please send me a pull request.
16 please send me a pull request.
17
17
18 To run RhodeCode in a development version you always need to install the latest
18 To run RhodeCode in a development version you always need to install the latest
19 required libs. Simply clone rhodecode and switch to beta branch::
19 required libs. Simply clone rhodecode and switch to beta branch::
20
20
21 hg clone -u dev https://secure.rhodecode.org/rhodecode
21 hg clone https://kallithea-scm.org/repos/kallithea
22
22
23 after downloading/pulling RhodeCode make sure you run::
23 after downloading/pulling RhodeCode make sure you run::
24
24
25 python setup.py develop
25 python setup.py develop
26
26
27 command to install/verify all required packages, and prepare development
27 command to install/verify all required packages, and prepare development
28 enviroment.
28 enviroment.
29
29
30 There are two files in the directory production.ini and developement.ini copy
30 There are two files in the directory production.ini and developement.ini copy
31 the `development.ini` file as rc.ini (which is excluded from version controll)
31 the `development.ini` file as rc.ini (which is excluded from version controll)
32 and put all your changes like db connection or server port in there.
32 and put all your changes like db connection or server port in there.
33
33
34 After finishing your changes make sure all tests passes ok. You can run
34 After finishing your changes make sure all tests passes ok. You can run
35 the testsuite running ``nosetest`` from the project root, or if you use tox
35 the testsuite running ``nosetest`` from the project root, or if you use tox
36 run tox for python2.5-2.7 with multiple database test. When using `nosetests`
36 run tox for python2.5-2.7 with multiple database test. When using `nosetests`
37 test.ini file is used and by default it uses sqlite for tests, edit this file
37 test.ini file is used and by default it uses sqlite for tests, edit this file
38 to change your testing enviroment.
38 to change your testing enviroment.
39
39
40
40
41 There's a special set of tests for push/pull operations, you can runn them using::
41 There's a special set of tests for push/pull operations, you can runn them using::
42
42
43 paster serve test.ini --pid-file=test.pid --daemon
43 paster serve test.ini --pid-file=test.pid --daemon
44 RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests -x rhodecode/tests/other/test_vcs_operations.py
44 RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests -x rhodecode/tests/other/test_vcs_operations.py
45 kill -9 $(cat test.pid)
45 kill -9 $(cat test.pid)
46
46
47
47
48 | Thank you for any contributions!
48 | Thank you for any contributions!
49 | Marcin
49 | Marcin
50
50
51
51
52
52
53 .. _bitbucket: http://bitbucket.org/
53 .. _bitbucket: http://bitbucket.org/
@@ -1,746 +1,746 b''
1 .. _setup:
1 .. _setup:
2
2
3 =====
3 =====
4 Setup
4 Setup
5 =====
5 =====
6
6
7
7
8 Setting up RhodeCode
8 Setting up RhodeCode
9 --------------------
9 --------------------
10
10
11 First, you will need to create a RhodeCode configuration file. Run the
11 First, you will need to create a RhodeCode configuration file. Run the
12 following command to do this::
12 following command to do this::
13
13
14 paster make-config RhodeCode production.ini
14 paster make-config RhodeCode production.ini
15
15
16 - This will create the file `production.ini` in the current directory. This
16 - This will create the file `production.ini` in the current directory. This
17 configuration file contains the various settings for RhodeCode, e.g proxy
17 configuration file contains the various settings for RhodeCode, e.g proxy
18 port, email settings, usage of static files, cache, celery settings and
18 port, email settings, usage of static files, cache, celery settings and
19 logging.
19 logging.
20
20
21
21
22 Next, you need to create the databases used by RhodeCode. I recommend that you
22 Next, you need to create the databases used by RhodeCode. I recommend that you
23 use postgresql or sqlite (default). If you choose a database other than the
23 use postgresql or sqlite (default). If you choose a database other than the
24 default ensure you properly adjust the db url in your production.ini
24 default ensure you properly adjust the db url in your production.ini
25 configuration file to use this other database. RhodeCode currently supports
25 configuration file to use this other database. RhodeCode currently supports
26 postgresql, sqlite and mysql databases. Create the database by running
26 postgresql, sqlite and mysql databases. Create the database by running
27 the following command::
27 the following command::
28
28
29 paster setup-rhodecode production.ini
29 paster setup-rhodecode production.ini
30
30
31 This will prompt you for a "root" path. This "root" path is the location where
31 This will prompt you for a "root" path. This "root" path is the location where
32 RhodeCode will store all of its repositories on the current machine. After
32 RhodeCode will store all of its repositories on the current machine. After
33 entering this "root" path ``setup-rhodecode`` will also prompt you for a username
33 entering this "root" path ``setup-rhodecode`` will also prompt you for a username
34 and password for the initial admin account which ``setup-rhodecode`` sets
34 and password for the initial admin account which ``setup-rhodecode`` sets
35 up for you.
35 up for you.
36
36
37 setup process can be fully automated, example for lazy::
37 setup process can be fully automated, example for lazy::
38
38
39 paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
39 paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
40
40
41
41
42 - The ``setup-rhodecode`` command will create all of the needed tables and an
42 - The ``setup-rhodecode`` command will create all of the needed tables and an
43 admin account. When choosing a root path you can either use a new empty
43 admin account. When choosing a root path you can either use a new empty
44 location, or a location which already contains existing repositories. If you
44 location, or a location which already contains existing repositories. If you
45 choose a location which contains existing repositories RhodeCode will simply
45 choose a location which contains existing repositories RhodeCode will simply
46 add all of the repositories at the chosen location to it's database.
46 add all of the repositories at the chosen location to it's database.
47 (Note: make sure you specify the correct path to the root).
47 (Note: make sure you specify the correct path to the root).
48 - Note: the given path for mercurial_ repositories **must** be write accessible
48 - Note: the given path for mercurial_ repositories **must** be write accessible
49 for the application. It's very important since the RhodeCode web interface
49 for the application. It's very important since the RhodeCode web interface
50 will work without write access, but when trying to do a push it will
50 will work without write access, but when trying to do a push it will
51 eventually fail with permission denied errors unless it has write access.
51 eventually fail with permission denied errors unless it has write access.
52
52
53 You are now ready to use RhodeCode, to run it simply execute::
53 You are now ready to use RhodeCode, to run it simply execute::
54
54
55 paster serve production.ini
55 paster serve production.ini
56
56
57 - This command runs the RhodeCode server. The web app should be available at the
57 - This command runs the RhodeCode server. The web app should be available at the
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
58 127.0.0.1:5000. This ip and port is configurable via the production.ini
59 file created in previous step
59 file created in previous step
60 - Use the admin account you created above when running ``setup-rhodecode``
60 - Use the admin account you created above when running ``setup-rhodecode``
61 to login to the web app.
61 to login to the web app.
62 - The default permissions on each repository is read, and the owner is admin.
62 - The default permissions on each repository is read, and the owner is admin.
63 Remember to update these if needed.
63 Remember to update these if needed.
64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
64 - In the admin panel you can toggle ldap, anonymous, permissions settings. As
65 well as edit more advanced options on users and repositories
65 well as edit more advanced options on users and repositories
66
66
67 Optionally users can create `rcextensions` package that extends RhodeCode
67 Optionally users can create `rcextensions` package that extends RhodeCode
68 functionality. To do this simply execute::
68 functionality. To do this simply execute::
69
69
70 paster make-rcext production.ini
70 paster make-rcext production.ini
71
71
72 This will create `rcextensions` package in the same place that your `ini` file
72 This will create `rcextensions` package in the same place that your `ini` file
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
73 lives. With `rcextensions` it's possible to add additional mapping for whoosh,
74 stats and add additional code into the push/pull/create/delete repo hooks.
74 stats and add additional code into the push/pull/create/delete repo hooks.
75 For example for sending signals to build-bots such as jenkins.
75 For example for sending signals to build-bots such as jenkins.
76 Please see the `__init__.py` file inside `rcextensions` package
76 Please see the `__init__.py` file inside `rcextensions` package
77 for more details.
77 for more details.
78
78
79
79
80 Using RhodeCode with SSH
80 Using RhodeCode with SSH
81 ------------------------
81 ------------------------
82
82
83 RhodeCode currently only hosts repositories using http and https. (The addition
83 RhodeCode currently only hosts repositories using http and https. (The addition
84 of ssh hosting is a planned future feature.) However you can easily use ssh in
84 of ssh hosting is a planned future feature.) However you can easily use ssh in
85 parallel with RhodeCode. (Repository access via ssh is a standard "out of
85 parallel with RhodeCode. (Repository access via ssh is a standard "out of
86 the box" feature of mercurial_ and you can use this to access any of the
86 the box" feature of mercurial_ and you can use this to access any of the
87 repositories that RhodeCode is hosting. See PublishingRepositories_)
87 repositories that RhodeCode is hosting. See PublishingRepositories_)
88
88
89 RhodeCode repository structures are kept in directories with the same name
89 RhodeCode repository structures are kept in directories with the same name
90 as the project. When using repository groups, each group is a subdirectory.
90 as the project. When using repository groups, each group is a subdirectory.
91 This allows you to easily use ssh for accessing repositories.
91 This allows you to easily use ssh for accessing repositories.
92
92
93 In order to use ssh you need to make sure that your web-server and the users
93 In order to use ssh you need to make sure that your web-server and the users
94 login accounts have the correct permissions set on the appropriate directories.
94 login accounts have the correct permissions set on the appropriate directories.
95 (Note that these permissions are independent of any permissions you have set up
95 (Note that these permissions are independent of any permissions you have set up
96 using the RhodeCode web interface.)
96 using the RhodeCode web interface.)
97
97
98 If your main directory (the same as set in RhodeCode settings) is for example
98 If your main directory (the same as set in RhodeCode settings) is for example
99 set to **/home/hg** and the repository you are using is named `rhodecode`, then
99 set to **/home/hg** and the repository you are using is named `rhodecode`, then
100 to clone via ssh you should run::
100 to clone via ssh you should run::
101
101
102 hg clone ssh://user@server.com/home/hg/rhodecode
102 hg clone ssh://user@server.com/home/hg/rhodecode
103
103
104 Using other external tools such as mercurial-server_ or using ssh key based
104 Using other external tools such as mercurial-server_ or using ssh key based
105 authentication is fully supported.
105 authentication is fully supported.
106
106
107 Note: In an advanced setup, in order for your ssh access to use the same
107 Note: In an advanced setup, in order for your ssh access to use the same
108 permissions as set up via the RhodeCode web interface, you can create an
108 permissions as set up via the RhodeCode web interface, you can create an
109 authentication hook to connect to the rhodecode db and runs check functions for
109 authentication hook to connect to the rhodecode db and runs check functions for
110 permissions against that.
110 permissions against that.
111
111
112 Setting up Whoosh full text search
112 Setting up Whoosh full text search
113 ----------------------------------
113 ----------------------------------
114
114
115 Starting from version 1.1 the whoosh index can be build by using the paster
115 Starting from version 1.1 the whoosh index can be build by using the paster
116 command ``make-index``. To use ``make-index`` you must specify the configuration
116 command ``make-index``. To use ``make-index`` you must specify the configuration
117 file that stores the location of the index. You may specify the location of the
117 file that stores the location of the index. You may specify the location of the
118 repositories (`--repo-location`). If not specified, this value is retrieved
118 repositories (`--repo-location`). If not specified, this value is retrieved
119 from the RhodeCode database. This was required prior to 1.2. Starting from
119 from the RhodeCode database. This was required prior to 1.2. Starting from
120 version 1.2 it is also possible to specify a comma separated list of
120 version 1.2 it is also possible to specify a comma separated list of
121 repositories (`--index-only`) to build index only on chooses repositories
121 repositories (`--index-only`) to build index only on chooses repositories
122 skipping any other found in repos location
122 skipping any other found in repos location
123
123
124 You may optionally pass the option `-f` to enable a full index rebuild. Without
124 You may optionally pass the option `-f` to enable a full index rebuild. Without
125 the `-f` option, indexing will run always in "incremental" mode.
125 the `-f` option, indexing will run always in "incremental" mode.
126
126
127 For an incremental index build use::
127 For an incremental index build use::
128
128
129 paster make-index production.ini
129 paster make-index production.ini
130
130
131 For a full index rebuild use::
131 For a full index rebuild use::
132
132
133 paster make-index production.ini -f
133 paster make-index production.ini -f
134
134
135
135
136 building index just for chosen repositories is possible with such command::
136 building index just for chosen repositories is possible with such command::
137
137
138 paster make-index production.ini --index-only=vcs,rhodecode
138 paster make-index production.ini --index-only=vcs,rhodecode
139
139
140
140
141 In order to do periodical index builds and keep your index always up to date.
141 In order to do periodical index builds and keep your index always up to date.
142 It's recommended to do a crontab entry for incremental indexing.
142 It's recommended to do a crontab entry for incremental indexing.
143 An example entry might look like this::
143 An example entry might look like this::
144
144
145 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
145 /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
146
146
147 When using incremental mode (the default) whoosh will check the last
147 When using incremental mode (the default) whoosh will check the last
148 modification date of each file and add it to be reindexed if a newer file is
148 modification date of each file and add it to be reindexed if a newer file is
149 available. The indexing daemon checks for any removed files and removes them
149 available. The indexing daemon checks for any removed files and removes them
150 from index.
150 from index.
151
151
152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
152 If you want to rebuild index from scratch, you can use the `-f` flag as above,
153 or in the admin panel you can check `build from scratch` flag.
153 or in the admin panel you can check `build from scratch` flag.
154
154
155
155
156 Setting up LDAP support
156 Setting up LDAP support
157 -----------------------
157 -----------------------
158
158
159 RhodeCode starting from version 1.1 supports ldap authentication. In order
159 RhodeCode starting from version 1.1 supports ldap authentication. In order
160 to use LDAP, you have to install the python-ldap_ package. This package is
160 to use LDAP, you have to install the python-ldap_ package. This package is
161 available via pypi, so you can install it by running
161 available via pypi, so you can install it by running
162
162
163 using easy_install::
163 using easy_install::
164
164
165 easy_install python-ldap
165 easy_install python-ldap
166
166
167 using pip::
167 using pip::
168
168
169 pip install python-ldap
169 pip install python-ldap
170
170
171 .. note::
171 .. note::
172 python-ldap requires some certain libs on your system, so before installing
172 python-ldap requires some certain libs on your system, so before installing
173 it check that you have at least `openldap`, and `sasl` libraries.
173 it check that you have at least `openldap`, and `sasl` libraries.
174
174
175 LDAP settings are located in admin->ldap section,
175 LDAP settings are located in admin->ldap section,
176
176
177 Here's a typical ldap setup::
177 Here's a typical ldap setup::
178
178
179 Connection settings
179 Connection settings
180 Enable LDAP = checked
180 Enable LDAP = checked
181 Host = host.example.org
181 Host = host.example.org
182 Port = 389
182 Port = 389
183 Account = <account>
183 Account = <account>
184 Password = <password>
184 Password = <password>
185 Connection Security = LDAPS connection
185 Connection Security = LDAPS connection
186 Certificate Checks = DEMAND
186 Certificate Checks = DEMAND
187
187
188 Search settings
188 Search settings
189 Base DN = CN=users,DC=host,DC=example,DC=org
189 Base DN = CN=users,DC=host,DC=example,DC=org
190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
190 LDAP Filter = (&(objectClass=user)(!(objectClass=computer)))
191 LDAP Search Scope = SUBTREE
191 LDAP Search Scope = SUBTREE
192
192
193 Attribute mappings
193 Attribute mappings
194 Login Attribute = uid
194 Login Attribute = uid
195 First Name Attribute = firstName
195 First Name Attribute = firstName
196 Last Name Attribute = lastName
196 Last Name Attribute = lastName
197 E-mail Attribute = mail
197 E-mail Attribute = mail
198
198
199 If your user groups are placed in a Organisation Unit (OU) structure the Search Settings configuration differs::
199 If your user groups are placed in a Organisation Unit (OU) structure the Search Settings configuration differs::
200
200
201 Search settings
201 Search settings
202 Base DN = DC=host,DC=example,DC=org
202 Base DN = DC=host,DC=example,DC=org
203 LDAP Filter = (&(memberOf=CN=your user group,OU=subunit,OU=unit,DC=host,DC=example,DC=org)(objectClass=user))
203 LDAP Filter = (&(memberOf=CN=your user group,OU=subunit,OU=unit,DC=host,DC=example,DC=org)(objectClass=user))
204 LDAP Search Scope = SUBTREE
204 LDAP Search Scope = SUBTREE
205
205
206 .. _enable_ldap:
206 .. _enable_ldap:
207
207
208 Enable LDAP : required
208 Enable LDAP : required
209 Whether to use LDAP for authenticating users.
209 Whether to use LDAP for authenticating users.
210
210
211 .. _ldap_host:
211 .. _ldap_host:
212
212
213 Host : required
213 Host : required
214 LDAP server hostname or IP address. Can be also a comma separated
214 LDAP server hostname or IP address. Can be also a comma separated
215 list of servers to support LDAP fail-over.
215 list of servers to support LDAP fail-over.
216
216
217 .. _Port:
217 .. _Port:
218
218
219 Port : required
219 Port : required
220 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
220 389 for un-encrypted LDAP, 636 for SSL-encrypted LDAP.
221
221
222 .. _ldap_account:
222 .. _ldap_account:
223
223
224 Account : optional
224 Account : optional
225 Only required if the LDAP server does not allow anonymous browsing of
225 Only required if the LDAP server does not allow anonymous browsing of
226 records. This should be a special account for record browsing. This
226 records. This should be a special account for record browsing. This
227 will require `LDAP Password`_ below.
227 will require `LDAP Password`_ below.
228
228
229 .. _LDAP Password:
229 .. _LDAP Password:
230
230
231 Password : optional
231 Password : optional
232 Only required if the LDAP server does not allow anonymous browsing of
232 Only required if the LDAP server does not allow anonymous browsing of
233 records.
233 records.
234
234
235 .. _Enable LDAPS:
235 .. _Enable LDAPS:
236
236
237 Connection Security : required
237 Connection Security : required
238 Defines the connection to LDAP server
238 Defines the connection to LDAP server
239
239
240 No encryption
240 No encryption
241 Plain non encrypted connection
241 Plain non encrypted connection
242
242
243 LDAPS connection
243 LDAPS connection
244 Enable ldaps connection. It will likely require `Port`_ to be set to
244 Enable ldaps connection. It will likely require `Port`_ to be set to
245 a different value (standard LDAPS port is 636). When LDAPS is enabled
245 a different value (standard LDAPS port is 636). When LDAPS is enabled
246 then `Certificate Checks`_ is required.
246 then `Certificate Checks`_ is required.
247
247
248 START_TLS on LDAP connection
248 START_TLS on LDAP connection
249 START TLS connection
249 START TLS connection
250
250
251 .. _Certificate Checks:
251 .. _Certificate Checks:
252
252
253 Certificate Checks : optional
253 Certificate Checks : optional
254 How SSL certificates verification is handled - this is only useful when
254 How SSL certificates verification is handled - this is only useful when
255 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
255 `Enable LDAPS`_ is enabled. Only DEMAND or HARD offer full SSL security
256 while the other options are susceptible to man-in-the-middle attacks. SSL
256 while the other options are susceptible to man-in-the-middle attacks. SSL
257 certificates can be installed to /etc/openldap/cacerts so that the
257 certificates can be installed to /etc/openldap/cacerts so that the
258 DEMAND or HARD options can be used with self-signed certificates or
258 DEMAND or HARD options can be used with self-signed certificates or
259 certificates that do not have traceable certificates of authority.
259 certificates that do not have traceable certificates of authority.
260
260
261 NEVER
261 NEVER
262 A serve certificate will never be requested or checked.
262 A serve certificate will never be requested or checked.
263
263
264 ALLOW
264 ALLOW
265 A server certificate is requested. Failure to provide a
265 A server certificate is requested. Failure to provide a
266 certificate or providing a bad certificate will not terminate the
266 certificate or providing a bad certificate will not terminate the
267 session.
267 session.
268
268
269 TRY
269 TRY
270 A server certificate is requested. Failure to provide a
270 A server certificate is requested. Failure to provide a
271 certificate does not halt the session; providing a bad certificate
271 certificate does not halt the session; providing a bad certificate
272 halts the session.
272 halts the session.
273
273
274 DEMAND
274 DEMAND
275 A server certificate is requested and must be provided and
275 A server certificate is requested and must be provided and
276 authenticated for the session to proceed.
276 authenticated for the session to proceed.
277
277
278 HARD
278 HARD
279 The same as DEMAND.
279 The same as DEMAND.
280
280
281 .. _Base DN:
281 .. _Base DN:
282
282
283 Base DN : required
283 Base DN : required
284 The Distinguished Name (DN) where searches for users will be performed.
284 The Distinguished Name (DN) where searches for users will be performed.
285 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
285 Searches can be controlled by `LDAP Filter`_ and `LDAP Search Scope`_.
286
286
287 .. _LDAP Filter:
287 .. _LDAP Filter:
288
288
289 LDAP Filter : optional
289 LDAP Filter : optional
290 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
290 A LDAP filter defined by RFC 2254. This is more useful when `LDAP
291 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
291 Search Scope`_ is set to SUBTREE. The filter is useful for limiting
292 which LDAP objects are identified as representing Users for
292 which LDAP objects are identified as representing Users for
293 authentication. The filter is augmented by `Login Attribute`_ below.
293 authentication. The filter is augmented by `Login Attribute`_ below.
294 This can commonly be left blank.
294 This can commonly be left blank.
295
295
296 .. _LDAP Search Scope:
296 .. _LDAP Search Scope:
297
297
298 LDAP Search Scope : required
298 LDAP Search Scope : required
299 This limits how far LDAP will search for a matching object.
299 This limits how far LDAP will search for a matching object.
300
300
301 BASE
301 BASE
302 Only allows searching of `Base DN`_ and is usually not what you
302 Only allows searching of `Base DN`_ and is usually not what you
303 want.
303 want.
304
304
305 ONELEVEL
305 ONELEVEL
306 Searches all entries under `Base DN`_, but not Base DN itself.
306 Searches all entries under `Base DN`_, but not Base DN itself.
307
307
308 SUBTREE
308 SUBTREE
309 Searches all entries below `Base DN`_, but not Base DN itself.
309 Searches all entries below `Base DN`_, but not Base DN itself.
310 When using SUBTREE `LDAP Filter`_ is useful to limit object
310 When using SUBTREE `LDAP Filter`_ is useful to limit object
311 location.
311 location.
312
312
313 .. _Login Attribute:
313 .. _Login Attribute:
314
314
315 Login Attribute : required
315 Login Attribute : required
316 The LDAP record attribute that will be matched as the USERNAME or
316 The LDAP record attribute that will be matched as the USERNAME or
317 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
317 ACCOUNT used to connect to RhodeCode. This will be added to `LDAP
318 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
318 Filter`_ for locating the User object. If `LDAP Filter`_ is specified as
319 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
319 "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
320 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
320 connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
321 ::
321 ::
322
322
323 (&(LDAPFILTER)(uid=jsmith))
323 (&(LDAPFILTER)(uid=jsmith))
324
324
325 .. _ldap_attr_firstname:
325 .. _ldap_attr_firstname:
326
326
327 First Name Attribute : required
327 First Name Attribute : required
328 The LDAP record attribute which represents the user's first name.
328 The LDAP record attribute which represents the user's first name.
329
329
330 .. _ldap_attr_lastname:
330 .. _ldap_attr_lastname:
331
331
332 Last Name Attribute : required
332 Last Name Attribute : required
333 The LDAP record attribute which represents the user's last name.
333 The LDAP record attribute which represents the user's last name.
334
334
335 .. _ldap_attr_email:
335 .. _ldap_attr_email:
336
336
337 Email Attribute : required
337 Email Attribute : required
338 The LDAP record attribute which represents the user's email address.
338 The LDAP record attribute which represents the user's email address.
339
339
340 If all data are entered correctly, and python-ldap_ is properly installed
340 If all data are entered correctly, and python-ldap_ is properly installed
341 users should be granted access to RhodeCode with ldap accounts. At this
341 users should be granted access to RhodeCode with ldap accounts. At this
342 time user information is copied from LDAP into the RhodeCode user database.
342 time user information is copied from LDAP into the RhodeCode user database.
343 This means that updates of an LDAP user object may not be reflected as a
343 This means that updates of an LDAP user object may not be reflected as a
344 user update in RhodeCode.
344 user update in RhodeCode.
345
345
346 If You have problems with LDAP access and believe You entered correct
346 If You have problems with LDAP access and believe You entered correct
347 information check out the RhodeCode logs, any error messages sent from LDAP
347 information check out the RhodeCode logs, any error messages sent from LDAP
348 will be saved there.
348 will be saved there.
349
349
350 Active Directory
350 Active Directory
351 ''''''''''''''''
351 ''''''''''''''''
352
352
353 RhodeCode can use Microsoft Active Directory for user authentication. This
353 RhodeCode can use Microsoft Active Directory for user authentication. This
354 is done through an LDAP or LDAPS connection to Active Directory. The
354 is done through an LDAP or LDAPS connection to Active Directory. The
355 following LDAP configuration settings are typical for using Active
355 following LDAP configuration settings are typical for using Active
356 Directory ::
356 Directory ::
357
357
358 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
358 Base DN = OU=SBSUsers,OU=Users,OU=MyBusiness,DC=v3sys,DC=local
359 Login Attribute = sAMAccountName
359 Login Attribute = sAMAccountName
360 First Name Attribute = givenName
360 First Name Attribute = givenName
361 Last Name Attribute = sn
361 Last Name Attribute = sn
362 E-mail Attribute = mail
362 E-mail Attribute = mail
363
363
364 All other LDAP settings will likely be site-specific and should be
364 All other LDAP settings will likely be site-specific and should be
365 appropriately configured.
365 appropriately configured.
366
366
367
367
368 Authentication by container or reverse-proxy
368 Authentication by container or reverse-proxy
369 --------------------------------------------
369 --------------------------------------------
370
370
371 Starting with version 1.3, RhodeCode supports delegating the authentication
371 Starting with version 1.3, RhodeCode supports delegating the authentication
372 of users to its WSGI container, or to a reverse-proxy server through which all
372 of users to its WSGI container, or to a reverse-proxy server through which all
373 clients access the application.
373 clients access the application.
374
374
375 When these authentication methods are enabled in RhodeCode, it uses the
375 When these authentication methods are enabled in RhodeCode, it uses the
376 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
376 username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
377 perform the authentication itself. The authorization, however, is still done by
377 perform the authentication itself. The authorization, however, is still done by
378 RhodeCode according to its settings.
378 RhodeCode according to its settings.
379
379
380 When a user logs in for the first time using these authentication methods,
380 When a user logs in for the first time using these authentication methods,
381 a matching user account is created in RhodeCode with default permissions. An
381 a matching user account is created in RhodeCode with default permissions. An
382 administrator can then modify it using RhodeCode's admin interface.
382 administrator can then modify it using RhodeCode's admin interface.
383 It's also possible for an administrator to create accounts and configure their
383 It's also possible for an administrator to create accounts and configure their
384 permissions before the user logs in for the first time.
384 permissions before the user logs in for the first time.
385
385
386 Container-based authentication
386 Container-based authentication
387 ''''''''''''''''''''''''''''''
387 ''''''''''''''''''''''''''''''
388
388
389 In a container-based authentication setup, RhodeCode reads the user name from
389 In a container-based authentication setup, RhodeCode reads the user name from
390 the ``REMOTE_USER`` server variable provided by the WSGI container.
390 the ``REMOTE_USER`` server variable provided by the WSGI container.
391
391
392 After setting up your container (see `Apache's WSGI config`_), you'd need
392 After setting up your container (see `Apache's WSGI config`_), you'd need
393 to configure it to require authentication on the location configured for
393 to configure it to require authentication on the location configured for
394 RhodeCode.
394 RhodeCode.
395
395
396 In order for RhodeCode to start using the provided username, you should set the
396 In order for RhodeCode to start using the provided username, you should set the
397 following in the [app:main] section of your .ini file::
397 following in the [app:main] section of your .ini file::
398
398
399 container_auth_enabled = true
399 container_auth_enabled = true
400
400
401
401
402 Proxy pass-through authentication
402 Proxy pass-through authentication
403 '''''''''''''''''''''''''''''''''
403 '''''''''''''''''''''''''''''''''
404
404
405 In a proxy pass-through authentication setup, RhodeCode reads the user name
405 In a proxy pass-through authentication setup, RhodeCode reads the user name
406 from the ``X-Forwarded-User`` request header, which should be configured to be
406 from the ``X-Forwarded-User`` request header, which should be configured to be
407 sent by the reverse-proxy server.
407 sent by the reverse-proxy server.
408
408
409 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
409 After setting up your proxy solution (see `Apache virtual host reverse proxy example`_,
410 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
410 `Apache as subdirectory`_ or `Nginx virtual host example`_), you'd need to
411 configure the authentication and add the username in a request header named
411 configure the authentication and add the username in a request header named
412 ``X-Forwarded-User``.
412 ``X-Forwarded-User``.
413
413
414 For example, the following config section for Apache sets a subdirectory in a
414 For example, the following config section for Apache sets a subdirectory in a
415 reverse-proxy setup with basic auth::
415 reverse-proxy setup with basic auth::
416
416
417 <Location /<someprefix> >
417 <Location /<someprefix> >
418 ProxyPass http://127.0.0.1:5000/<someprefix>
418 ProxyPass http://127.0.0.1:5000/<someprefix>
419 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
419 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
420 SetEnvIf X-Url-Scheme https HTTPS=1
420 SetEnvIf X-Url-Scheme https HTTPS=1
421
421
422 AuthType Basic
422 AuthType Basic
423 AuthName "RhodeCode authentication"
423 AuthName "RhodeCode authentication"
424 AuthUserFile /home/web/rhodecode/.htpasswd
424 AuthUserFile /home/web/rhodecode/.htpasswd
425 require valid-user
425 require valid-user
426
426
427 RequestHeader unset X-Forwarded-User
427 RequestHeader unset X-Forwarded-User
428
428
429 RewriteEngine On
429 RewriteEngine On
430 RewriteCond %{LA-U:REMOTE_USER} (.+)
430 RewriteCond %{LA-U:REMOTE_USER} (.+)
431 RewriteRule .* - [E=RU:%1]
431 RewriteRule .* - [E=RU:%1]
432 RequestHeader set X-Forwarded-User %{RU}e
432 RequestHeader set X-Forwarded-User %{RU}e
433 </Location>
433 </Location>
434
434
435 In order for RhodeCode to start using the forwarded username, you should set
435 In order for RhodeCode to start using the forwarded username, you should set
436 the following in the [app:main] section of your .ini file::
436 the following in the [app:main] section of your .ini file::
437
437
438 proxypass_auth_enabled = true
438 proxypass_auth_enabled = true
439
439
440 .. note::
440 .. note::
441 If you enable proxy pass-through authentication, make sure your server is
441 If you enable proxy pass-through authentication, make sure your server is
442 only accessible through the proxy. Otherwise, any client would be able to
442 only accessible through the proxy. Otherwise, any client would be able to
443 forge the authentication header and could effectively become authenticated
443 forge the authentication header and could effectively become authenticated
444 using any account of their liking.
444 using any account of their liking.
445
445
446 Integration with Issue trackers
446 Integration with Issue trackers
447 -------------------------------
447 -------------------------------
448
448
449 RhodeCode provides a simple integration with issue trackers. It's possible
449 RhodeCode provides a simple integration with issue trackers. It's possible
450 to define a regular expression that will fetch issue id stored in commit
450 to define a regular expression that will fetch issue id stored in commit
451 messages and replace that with an url to this issue. To enable this simply
451 messages and replace that with an url to this issue. To enable this simply
452 uncomment following variables in the ini file::
452 uncomment following variables in the ini file::
453
453
454 issue_pat = (?:^#|\s#)(\w+)
454 issue_pat = (?:^#|\s#)(\w+)
455 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
455 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
456 issue_prefix = #
456 issue_prefix = #
457
457
458 `issue_pat` is the regular expression that will fetch issues from commit messages.
458 `issue_pat` is the regular expression that will fetch issues from commit messages.
459 Default regex will match issues in format of #<number> eg. #300.
459 Default regex will match issues in format of #<number> eg. #300.
460
460
461 Matched issues will be replace with the link specified as `issue_server_link`
461 Matched issues will be replace with the link specified as `issue_server_link`
462 {id} will be replaced with issue id, and {repo} with repository name.
462 {id} will be replaced with issue id, and {repo} with repository name.
463 Since the # is striped `issue_prefix` is added as a prefix to url.
463 Since the # is striped `issue_prefix` is added as a prefix to url.
464 `issue_prefix` can be something different than # if you pass
464 `issue_prefix` can be something different than # if you pass
465 ISSUE- as issue prefix this will generate an url in format::
465 ISSUE- as issue prefix this will generate an url in format::
466
466
467 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
467 <a href="https://myissueserver.com/example_repo/issue/300">ISSUE-300</a>
468
468
469 Hook management
469 Hook management
470 ---------------
470 ---------------
471
471
472 Hooks can be managed in similar way to this used in .hgrc files.
472 Hooks can be managed in similar way to this used in .hgrc files.
473 To access hooks setting click `advanced setup` on Hooks section of Mercurial
473 To access hooks setting click `advanced setup` on Hooks section of Mercurial
474 Settings in Admin.
474 Settings in Admin.
475
475
476 There are 4 built in hooks that cannot be changed (only enable/disable by
476 There are 4 built in hooks that cannot be changed (only enable/disable by
477 checkboxes on previos section).
477 checkboxes on previos section).
478 To add another custom hook simply fill in first section with
478 To add another custom hook simply fill in first section with
479 <name>.<hook_type> and the second one with hook path. Example hooks
479 <name>.<hook_type> and the second one with hook path. Example hooks
480 can be found at *rhodecode.lib.hooks*.
480 can be found at *rhodecode.lib.hooks*.
481
481
482
482
483 Changing default encoding
483 Changing default encoding
484 -------------------------
484 -------------------------
485
485
486 By default RhodeCode uses utf8 encoding, starting from 1.3 series this
486 By default RhodeCode uses utf8 encoding, starting from 1.3 series this
487 can be changed, simply edit default_encoding in .ini file to desired one.
487 can be changed, simply edit default_encoding in .ini file to desired one.
488 This affects many parts in rhodecode including committers names, filenames,
488 This affects many parts in rhodecode including committers names, filenames,
489 encoding of commit messages. In addition RhodeCode can detect if `chardet`
489 encoding of commit messages. In addition RhodeCode can detect if `chardet`
490 library is installed. If `chardet` is detected RhodeCode will fallback to it
490 library is installed. If `chardet` is detected RhodeCode will fallback to it
491 when there are encode/decode errors.
491 when there are encode/decode errors.
492
492
493
493
494 Setting Up Celery
494 Setting Up Celery
495 -----------------
495 -----------------
496
496
497 Since version 1.1 celery is configured by the rhodecode ini configuration files.
497 Since version 1.1 celery is configured by the rhodecode ini configuration files.
498 Simply set use_celery=true in the ini file then add / change the configuration
498 Simply set use_celery=true in the ini file then add / change the configuration
499 variables inside the ini file.
499 variables inside the ini file.
500
500
501 Remember that the ini files use the format with '.' not with '_' like celery.
501 Remember that the ini files use the format with '.' not with '_' like celery.
502 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
502 So for example setting `BROKER_HOST` in celery means setting `broker.host` in
503 the config file.
503 the config file.
504
504
505 In order to start using celery run::
505 In order to start using celery run::
506
506
507 paster celeryd <configfile.ini>
507 paster celeryd <configfile.ini>
508
508
509
509
510 .. note::
510 .. note::
511 Make sure you run this command from the same virtualenv, and with the same
511 Make sure you run this command from the same virtualenv, and with the same
512 user that rhodecode runs.
512 user that rhodecode runs.
513
513
514 HTTPS support
514 HTTPS support
515 -------------
515 -------------
516
516
517 There are two ways to enable https:
517 There are two ways to enable https:
518
518
519 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
519 - Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
520 recognize this headers and make proper https redirections
520 recognize this headers and make proper https redirections
521 - Alternatively, change the `force_https = true` flag in the ini configuration
521 - Alternatively, change the `force_https = true` flag in the ini configuration
522 to force using https, no headers are needed than to enable https
522 to force using https, no headers are needed than to enable https
523
523
524
524
525 Nginx virtual host example
525 Nginx virtual host example
526 --------------------------
526 --------------------------
527
527
528 Sample config for nginx using proxy::
528 Sample config for nginx using proxy::
529
529
530 upstream rc {
530 upstream rc {
531 server 127.0.0.1:5000;
531 server 127.0.0.1:5000;
532 # add more instances for load balancing
532 # add more instances for load balancing
533 #server 127.0.0.1:5001;
533 #server 127.0.0.1:5001;
534 #server 127.0.0.1:5002;
534 #server 127.0.0.1:5002;
535 }
535 }
536
536
537 ## gist alias
537 ## gist alias
538 server {
538 server {
539 listen 443;
539 listen 443;
540 server_name gist.myserver.com;
540 server_name gist.myserver.com;
541 access_log /var/log/nginx/gist.access.log;
541 access_log /var/log/nginx/gist.access.log;
542 error_log /var/log/nginx/gist.error.log;
542 error_log /var/log/nginx/gist.error.log;
543
543
544 ssl on;
544 ssl on;
545 ssl_certificate gist.rhodecode.myserver.com.crt;
545 ssl_certificate gist.rhodecode.myserver.com.crt;
546 ssl_certificate_key gist.rhodecode.myserver.com.key;
546 ssl_certificate_key gist.rhodecode.myserver.com.key;
547
547
548 ssl_session_timeout 5m;
548 ssl_session_timeout 5m;
549
549
550 ssl_protocols SSLv3 TLSv1;
550 ssl_protocols SSLv3 TLSv1;
551 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;
551 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;
552 ssl_prefer_server_ciphers on;
552 ssl_prefer_server_ciphers on;
553
553
554 rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1;
554 rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1;
555 rewrite (.*) https://rhodecode.myserver.com/_admin/gists;
555 rewrite (.*) https://rhodecode.myserver.com/_admin/gists;
556 }
556 }
557
557
558 server {
558 server {
559 listen 443;
559 listen 443;
560 server_name rhodecode.myserver.com;
560 server_name rhodecode.myserver.com;
561 access_log /var/log/nginx/rhodecode.access.log;
561 access_log /var/log/nginx/rhodecode.access.log;
562 error_log /var/log/nginx/rhodecode.error.log;
562 error_log /var/log/nginx/rhodecode.error.log;
563
563
564 ssl on;
564 ssl on;
565 ssl_certificate rhodecode.myserver.com.crt;
565 ssl_certificate rhodecode.myserver.com.crt;
566 ssl_certificate_key rhodecode.myserver.com.key;
566 ssl_certificate_key rhodecode.myserver.com.key;
567
567
568 ssl_session_timeout 5m;
568 ssl_session_timeout 5m;
569
569
570 ssl_protocols SSLv3 TLSv1;
570 ssl_protocols SSLv3 TLSv1;
571 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;
571 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;
572 ssl_prefer_server_ciphers on;
572 ssl_prefer_server_ciphers on;
573
573
574 ## uncomment root directive if you want to serve static files by nginx
574 ## uncomment root directive if you want to serve static files by nginx
575 ## requires static_files = false in .ini file
575 ## requires static_files = false in .ini file
576 #root /path/to/installation/rhodecode/public;
576 #root /path/to/installation/rhodecode/public;
577 include /etc/nginx/proxy.conf;
577 include /etc/nginx/proxy.conf;
578 location / {
578 location / {
579 try_files $uri @rhode;
579 try_files $uri @rhode;
580 }
580 }
581
581
582 location @rhode {
582 location @rhode {
583 proxy_pass http://rc;
583 proxy_pass http://rc;
584 }
584 }
585
585
586 }
586 }
587
587
588 Here's the proxy.conf. It's tuned so it will not timeout on long
588 Here's the proxy.conf. It's tuned so it will not timeout on long
589 pushes or large pushes::
589 pushes or large pushes::
590
590
591 proxy_redirect off;
591 proxy_redirect off;
592 proxy_set_header Host $host;
592 proxy_set_header Host $host;
593 ## needed for container auth
593 ## needed for container auth
594 #proxy_set_header REMOTE_USER $remote_user;
594 #proxy_set_header REMOTE_USER $remote_user;
595 #proxy_set_header X-Forwarded-User $remote_user;
595 #proxy_set_header X-Forwarded-User $remote_user;
596 proxy_set_header X-Url-Scheme $scheme;
596 proxy_set_header X-Url-Scheme $scheme;
597 proxy_set_header X-Host $http_host;
597 proxy_set_header X-Host $http_host;
598 proxy_set_header X-Real-IP $remote_addr;
598 proxy_set_header X-Real-IP $remote_addr;
599 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
599 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
600 proxy_set_header Proxy-host $proxy_host;
600 proxy_set_header Proxy-host $proxy_host;
601 proxy_buffering off;
601 proxy_buffering off;
602 proxy_connect_timeout 7200;
602 proxy_connect_timeout 7200;
603 proxy_send_timeout 7200;
603 proxy_send_timeout 7200;
604 proxy_read_timeout 7200;
604 proxy_read_timeout 7200;
605 proxy_buffers 8 32k;
605 proxy_buffers 8 32k;
606 client_max_body_size 1024m;
606 client_max_body_size 1024m;
607 client_body_buffer_size 128k;
607 client_body_buffer_size 128k;
608 large_client_header_buffers 8 64k;
608 large_client_header_buffers 8 64k;
609
609
610
610
611 Apache virtual host reverse proxy example
611 Apache virtual host reverse proxy example
612 -----------------------------------------
612 -----------------------------------------
613
613
614 Here is a sample configuration file for apache using proxy::
614 Here is a sample configuration file for apache using proxy::
615
615
616 <VirtualHost *:80>
616 <VirtualHost *:80>
617 ServerName hg.myserver.com
617 ServerName hg.myserver.com
618 ServerAlias hg.myserver.com
618 ServerAlias hg.myserver.com
619
619
620 <Proxy *>
620 <Proxy *>
621 Order allow,deny
621 Order allow,deny
622 Allow from all
622 Allow from all
623 </Proxy>
623 </Proxy>
624
624
625 #important !
625 #important !
626 #Directive to properly generate url (clone url) for pylons
626 #Directive to properly generate url (clone url) for pylons
627 ProxyPreserveHost On
627 ProxyPreserveHost On
628
628
629 #rhodecode instance
629 #rhodecode instance
630 ProxyPass / http://127.0.0.1:5000/
630 ProxyPass / http://127.0.0.1:5000/
631 ProxyPassReverse / http://127.0.0.1:5000/
631 ProxyPassReverse / http://127.0.0.1:5000/
632
632
633 #to enable https use line below
633 #to enable https use line below
634 #SetEnvIf X-Url-Scheme https HTTPS=1
634 #SetEnvIf X-Url-Scheme https HTTPS=1
635
635
636 </VirtualHost>
636 </VirtualHost>
637
637
638
638
639 Additional tutorial
639 Additional tutorial
640 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
640 http://wiki.pylonshq.com/display/pylonscookbook/Apache+as+a+reverse+proxy+for+Pylons
641
641
642
642
643 Apache as subdirectory
643 Apache as subdirectory
644 ----------------------
644 ----------------------
645
645
646 Apache subdirectory part::
646 Apache subdirectory part::
647
647
648 <Location /<someprefix> >
648 <Location /<someprefix> >
649 ProxyPass http://127.0.0.1:5000/<someprefix>
649 ProxyPass http://127.0.0.1:5000/<someprefix>
650 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
650 ProxyPassReverse http://127.0.0.1:5000/<someprefix>
651 SetEnvIf X-Url-Scheme https HTTPS=1
651 SetEnvIf X-Url-Scheme https HTTPS=1
652 </Location>
652 </Location>
653
653
654 Besides the regular apache setup you will need to add the following line
654 Besides the regular apache setup you will need to add the following line
655 into [app:main] section of your .ini file::
655 into [app:main] section of your .ini file::
656
656
657 filter-with = proxy-prefix
657 filter-with = proxy-prefix
658
658
659 Add the following at the end of the .ini file::
659 Add the following at the end of the .ini file::
660
660
661 [filter:proxy-prefix]
661 [filter:proxy-prefix]
662 use = egg:PasteDeploy#prefix
662 use = egg:PasteDeploy#prefix
663 prefix = /<someprefix>
663 prefix = /<someprefix>
664
664
665
665
666 then change <someprefix> into your chosen prefix
666 then change <someprefix> into your chosen prefix
667
667
668 Apache's WSGI config
668 Apache's WSGI config
669 --------------------
669 --------------------
670
670
671 Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
671 Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
672 that, you'll need to:
672 that, you'll need to:
673
673
674 - Install mod_wsgi. If using a Debian-based distro, you can install
674 - Install mod_wsgi. If using a Debian-based distro, you can install
675 the package libapache2-mod-wsgi::
675 the package libapache2-mod-wsgi::
676
676
677 aptitude install libapache2-mod-wsgi
677 aptitude install libapache2-mod-wsgi
678
678
679 - Enable mod_wsgi::
679 - Enable mod_wsgi::
680
680
681 a2enmod wsgi
681 a2enmod wsgi
682
682
683 - Create a wsgi dispatch script, like the one below. Make sure you
683 - Create a wsgi dispatch script, like the one below. Make sure you
684 check the paths correctly point to where you installed RhodeCode
684 check the paths correctly point to where you installed RhodeCode
685 and its Python Virtual Environment.
685 and its Python Virtual Environment.
686 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
686 - Enable the WSGIScriptAlias directive for the wsgi dispatch script,
687 as in the following example. Once again, check the paths are
687 as in the following example. Once again, check the paths are
688 correctly specified.
688 correctly specified.
689
689
690 Here is a sample excerpt from an Apache Virtual Host configuration file::
690 Here is a sample excerpt from an Apache Virtual Host configuration file::
691
691
692 WSGIDaemonProcess pylons \
692 WSGIDaemonProcess pylons \
693 threads=4 \
693 threads=4 \
694 python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
694 python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
695 WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
695 WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
696 WSGIPassAuthorization On
696 WSGIPassAuthorization On
697
697
698 .. note::
698 .. note::
699 when running apache as root please add: `user=www-data group=www-data`
699 when running apache as root please add: `user=www-data group=www-data`
700 into above configuration
700 into above configuration
701
701
702 .. note::
702 .. note::
703 Running RhodeCode in multiprocess mode in apache is not supported,
703 Running RhodeCode in multiprocess mode in apache is not supported,
704 make sure you don't specify `processes=num` directive in the config
704 make sure you don't specify `processes=num` directive in the config
705
705
706
706
707 Example wsgi dispatch script::
707 Example wsgi dispatch script::
708
708
709 import os
709 import os
710 os.environ["HGENCODING"] = "UTF-8"
710 os.environ["HGENCODING"] = "UTF-8"
711 os.environ['PYTHON_EGG_CACHE'] = '/home/web/rhodecode/.egg-cache'
711 os.environ['PYTHON_EGG_CACHE'] = '/home/web/rhodecode/.egg-cache'
712
712
713 # sometimes it's needed to set the curent dir
713 # sometimes it's needed to set the curent dir
714 os.chdir('/home/web/rhodecode/')
714 os.chdir('/home/web/rhodecode/')
715
715
716 import site
716 import site
717 site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
717 site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
718
718
719 from paste.deploy import loadapp
719 from paste.deploy import loadapp
720 from paste.script.util.logging_config import fileConfig
720 from paste.script.util.logging_config import fileConfig
721
721
722 fileConfig('/home/web/rhodecode/production.ini')
722 fileConfig('/home/web/rhodecode/production.ini')
723 application = loadapp('config:/home/web/rhodecode/production.ini')
723 application = loadapp('config:/home/web/rhodecode/production.ini')
724
724
725 Note: when using mod_wsgi you'll need to install the same version of
725 Note: when using mod_wsgi you'll need to install the same version of
726 Mercurial that's inside RhodeCode's virtualenv also on the system's Python
726 Mercurial that's inside RhodeCode's virtualenv also on the system's Python
727 environment.
727 environment.
728
728
729
729
730 Other configuration files
730 Other configuration files
731 -------------------------
731 -------------------------
732
732
733 Some example init.d scripts can be found in init.d directory::
733 Some example init.d scripts can be found in init.d directory::
734
734
735 https://secure.rhodecode.org/rhodecode/files/beta/init.d
735 https://kallithea-scm.org/repos/kallithea/files/tip/init.d/
736
736
737 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
737 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
738 .. _python: http://www.python.org/
738 .. _python: http://www.python.org/
739 .. _mercurial: http://mercurial.selenic.com/
739 .. _mercurial: http://mercurial.selenic.com/
740 .. _celery: http://celeryproject.org/
740 .. _celery: http://celeryproject.org/
741 .. _rabbitmq: http://www.rabbitmq.com/
741 .. _rabbitmq: http://www.rabbitmq.com/
742 .. _python-ldap: http://www.python-ldap.org/
742 .. _python-ldap: http://www.python-ldap.org/
743 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
743 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
744 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
744 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
745 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
745 .. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
746 .. _google group rhodecode: http://groups.google.com/group/rhodecode
746 .. _google group rhodecode: http://groups.google.com/group/rhodecode
@@ -1,82 +1,82 b''
1 .. _troubleshooting:
1 .. _troubleshooting:
2
2
3
3
4 ===============
4 ===============
5 Troubleshooting
5 Troubleshooting
6 ===============
6 ===============
7
7
8 :Q: **Missing static files?**
8 :Q: **Missing static files?**
9 :A: Make sure either to set the `static_files = true` in the .ini file or
9 :A: Make sure either to set the `static_files = true` in the .ini file or
10 double check the root path for your http setup. It should point to
10 double check the root path for your http setup. It should point to
11 for example:
11 for example:
12 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
12 /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
13
13
14 |
14 |
15
15
16 :Q: **Can't install celery/rabbitmq?**
16 :Q: **Can't install celery/rabbitmq?**
17 :A: Don't worry RhodeCode works without them too. No extra setup is required.
17 :A: Don't worry RhodeCode works without them too. No extra setup is required.
18 Try out great celery docs for further help.
18 Try out great celery docs for further help.
19
19
20 |
20 |
21
21
22 :Q: **Long lasting push timeouts?**
22 :Q: **Long lasting push timeouts?**
23 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
23 :A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
24 are caused by https server and not RhodeCode.
24 are caused by https server and not RhodeCode.
25
25
26 |
26 |
27
27
28 :Q: **Large pushes timeouts?**
28 :Q: **Large pushes timeouts?**
29 :A: Make sure you set a proper max_body_size for the http server. Very often
29 :A: Make sure you set a proper max_body_size for the http server. Very often
30 Apache, Nginx or other http servers kill the connection due to to large
30 Apache, Nginx or other http servers kill the connection due to to large
31 body.
31 body.
32
32
33 |
33 |
34
34
35 :Q: **Apache doesn't pass basicAuth on pull/push?**
35 :Q: **Apache doesn't pass basicAuth on pull/push?**
36 :A: Make sure you added `WSGIPassAuthorization true`.
36 :A: Make sure you added `WSGIPassAuthorization true`.
37
37
38 |
38 |
39
39
40 :Q: **Git fails on push/pull?**
40 :Q: **Git fails on push/pull?**
41 :A: Make sure you're using an wsgi http server that can handle chunked encoding
41 :A: Make sure you're using an wsgi http server that can handle chunked encoding
42 such as `waitress` or `gunicorn`
42 such as `waitress` or `gunicorn`
43
43
44 |
44 |
45
45
46 :Q: **How i use hooks in RhodeCode?**
46 :Q: **How i use hooks in RhodeCode?**
47 :A: It's easy if they are python hooks just use advanced link in hooks section
47 :A: It's easy if they are python hooks just use advanced link in hooks section
48 in Admin panel, that works only for Mercurial. If you want to use githooks,
48 in Admin panel, that works only for Mercurial. If you want to use githooks,
49 just install proper one in repository eg. create file in
49 just install proper one in repository eg. create file in
50 `/gitrepo/hooks/pre-receive`. You can also use RhodeCode-extensions to
50 `/gitrepo/hooks/pre-receive`. You can also use RhodeCode-extensions to
51 connect to callback hooks, for both Git and Mercurial.
51 connect to callback hooks, for both Git and Mercurial.
52
52
53 |
53 |
54
54
55 :Q: **RhodeCode is slow for me, how can i make it faster?**
55 :Q: **RhodeCode is slow for me, how can i make it faster?**
56 :A: See the :ref:`performance` section
56 :A: See the :ref:`performance` section
57
57
58 |
58 |
59
59
60 :Q: **UnicodeDecodeError on Apache mod_wsgi**
60 :Q: **UnicodeDecodeError on Apache mod_wsgi**
61 :A: Please read: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#if-you-get-a-unicodeencodeerror
61 :A: Please read: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#if-you-get-a-unicodeencodeerror
62
62
63 |
63 |
64
64
65 :Q: **Requests hanging on Windows**
65 :Q: **Requests hanging on Windows**
66 :A: Please try out with disabled Antivirus software, there are some known problems with Eset Anitivirus. Make sure
66 :A: Please try out with disabled Antivirus software, there are some known problems with Eset Anitivirus. Make sure
67 you have installed latest windows patches (especially KB2789397)
67 you have installed latest windows patches (especially KB2789397)
68
68
69
69
70 For further questions search the `Issues tracker`_, or post a message in the
70 For further questions search the `Issues tracker`_, or post a message in the
71 `google group rhodecode`_
71 `google group rhodecode`_
72
72
73 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
73 .. _virtualenv: http://pypi.python.org/pypi/virtualenv
74 .. _python: http://www.python.org/
74 .. _python: http://www.python.org/
75 .. _mercurial: http://mercurial.selenic.com/
75 .. _mercurial: http://mercurial.selenic.com/
76 .. _celery: http://celeryproject.org/
76 .. _celery: http://celeryproject.org/
77 .. _rabbitmq: http://www.rabbitmq.com/
77 .. _rabbitmq: http://www.rabbitmq.com/
78 .. _python-ldap: http://www.python-ldap.org/
78 .. _python-ldap: http://www.python-ldap.org/
79 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
79 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
80 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
80 .. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
81 .. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
81 .. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
82 .. _google group rhodecode: http://groups.google.com/group/rhodecode
82 .. _google group rhodecode: http://groups.google.com/group/rhodecode
@@ -1,588 +1,588 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
21
21
22 #smtp_server = mail.server.com
22 #smtp_server = mail.server.com
23 #smtp_username =
23 #smtp_username =
24 #smtp_password =
24 #smtp_password =
25 #smtp_port =
25 #smtp_port =
26 #smtp_use_tls = false
26 #smtp_use_tls = false
27 #smtp_use_ssl = true
27 #smtp_use_ssl = true
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE ##
32 ## PASTE ##
33 #use = egg:Paste#http
33 #use = egg:Paste#http
34 ## nr of worker threads to spawn
34 ## nr of worker threads to spawn
35 #threadpool_workers = 5
35 #threadpool_workers = 5
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38 ## option to use threads of process
38 ## option to use threads of process
39 #use_threadpool = true
39 #use_threadpool = true
40
40
41 ## WAITRESS ##
41 ## WAITRESS ##
42 use = egg:waitress#main
42 use = egg:waitress#main
43 ## number of worker threads
43 ## number of worker threads
44 threads = 5
44 threads = 5
45 ## MAX BODY SIZE 100GB
45 ## MAX BODY SIZE 100GB
46 max_request_body_size = 107374182400
46 max_request_body_size = 107374182400
47 ## use poll instead of select, fixes fd limits, may not work on old
47 ## use poll instead of select, fixes fd limits, may not work on old
48 ## windows systems.
48 ## windows systems.
49 #asyncore_use_poll = True
49 #asyncore_use_poll = True
50
50
51 ## GUNICORN ##
51 ## GUNICORN ##
52 #use = egg:gunicorn#main
52 #use = egg:gunicorn#main
53 ## number of process workers. You must set `instance_id = *` when this option
53 ## number of process workers. You must set `instance_id = *` when this option
54 ## is set to more than one worker
54 ## is set to more than one worker
55 #workers = 1
55 #workers = 1
56 ## process name
56 ## process name
57 #proc_name = rhodecode
57 #proc_name = rhodecode
58 ## type of worker class, one of sync, eventlet, gevent, tornado
58 ## type of worker class, one of sync, eventlet, gevent, tornado
59 ## recommended for bigger setup is using of of other than sync one
59 ## recommended for bigger setup is using of of other than sync one
60 #worker_class = sync
60 #worker_class = sync
61 #max_requests = 5
61 #max_requests = 5
62 ## ammount of time a worker can handle request before it gets killed and
62 ## ammount of time a worker can handle request before it gets killed and
63 ## restarted
63 ## restarted
64 #timeout = 3600
64 #timeout = 3600
65
65
66 ## UWSGI ##
66 ## UWSGI ##
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
68 #[uwsgi]
68 #[uwsgi]
69 #socket = /tmp/uwsgi.sock
69 #socket = /tmp/uwsgi.sock
70 #master = true
70 #master = true
71 #http = 127.0.0.1:5000
71 #http = 127.0.0.1:5000
72
72
73 ## set as deamon and redirect all output to file
73 ## set as deamon and redirect all output to file
74 #daemonize = ./uwsgi_rhodecode.log
74 #daemonize = ./uwsgi_rhodecode.log
75
75
76 ## master process PID
76 ## master process PID
77 #pidfile = ./uwsgi_rhodecode.pid
77 #pidfile = ./uwsgi_rhodecode.pid
78
78
79 ## stats server with workers statistics, use uwsgitop
79 ## stats server with workers statistics, use uwsgitop
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
81 #stats = 127.0.0.1:1717
81 #stats = 127.0.0.1:1717
82 #memory-report = true
82 #memory-report = true
83
83
84 ## log 5XX errors
84 ## log 5XX errors
85 #log-5xx = true
85 #log-5xx = true
86
86
87 ## Set the socket listen queue size.
87 ## Set the socket listen queue size.
88 #listen = 256
88 #listen = 256
89
89
90 ## Gracefully Reload workers after the specified amount of managed requests
90 ## Gracefully Reload workers after the specified amount of managed requests
91 ## (avoid memory leaks).
91 ## (avoid memory leaks).
92 #max-requests = 1000
92 #max-requests = 1000
93
93
94 ## enable large buffers
94 ## enable large buffers
95 #buffer-size=65535
95 #buffer-size=65535
96
96
97 ## socket and http timeouts ##
97 ## socket and http timeouts ##
98 #http-timeout=3600
98 #http-timeout=3600
99 #socket-timeout=3600
99 #socket-timeout=3600
100
100
101 ## Log requests slower than the specified number of milliseconds.
101 ## Log requests slower than the specified number of milliseconds.
102 #log-slow = 10
102 #log-slow = 10
103
103
104 ## Exit if no app can be loaded.
104 ## Exit if no app can be loaded.
105 #need-app = true
105 #need-app = true
106
106
107 ## Set lazy mode (load apps in workers instead of master).
107 ## Set lazy mode (load apps in workers instead of master).
108 #lazy = true
108 #lazy = true
109
109
110 ## scaling ##
110 ## scaling ##
111 ## set cheaper algorithm to use, if not set default will be used
111 ## set cheaper algorithm to use, if not set default will be used
112 #cheaper-algo = spare
112 #cheaper-algo = spare
113
113
114 ## minimum number of workers to keep at all times
114 ## minimum number of workers to keep at all times
115 #cheaper = 1
115 #cheaper = 1
116
116
117 ## number of workers to spawn at startup
117 ## number of workers to spawn at startup
118 #cheaper-initial = 1
118 #cheaper-initial = 1
119
119
120 ## maximum number of workers that can be spawned
120 ## maximum number of workers that can be spawned
121 #workers = 4
121 #workers = 4
122
122
123 ## how many workers should be spawned at a time
123 ## how many workers should be spawned at a time
124 #cheaper-step = 1
124 #cheaper-step = 1
125
125
126 ## COMMON ##
126 ## COMMON ##
127 host = 127.0.0.1
127 host = 127.0.0.1
128 port = 5000
128 port = 5000
129
129
130 ## prefix middleware for rc
130 ## prefix middleware for rc
131 #[filter:proxy-prefix]
131 #[filter:proxy-prefix]
132 #use = egg:PasteDeploy#prefix
132 #use = egg:PasteDeploy#prefix
133 #prefix = /<your-prefix>
133 #prefix = /<your-prefix>
134
134
135 [app:main]
135 [app:main]
136 use = egg:rhodecode
136 use = egg:rhodecode
137 ## enable proxy prefix middleware
137 ## enable proxy prefix middleware
138 #filter-with = proxy-prefix
138 #filter-with = proxy-prefix
139
139
140 full_stack = true
140 full_stack = true
141 static_files = true
141 static_files = true
142 ## Optional Languages
142 ## Optional Languages
143 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
143 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
144 lang = en
144 lang = en
145 cache_dir = %(here)s/data
145 cache_dir = %(here)s/data
146 index_dir = %(here)s/data/index
146 index_dir = %(here)s/data/index
147
147
148 ## perform a full repository scan on each server start, this should be
148 ## perform a full repository scan on each server start, this should be
149 ## set to false after first startup, to allow faster server restarts.
149 ## set to false after first startup, to allow faster server restarts.
150 initial_repo_scan = true
150 initial_repo_scan = true
151
151
152 ## uncomment and set this path to use archive download cache
152 ## uncomment and set this path to use archive download cache
153 #archive_cache_dir = /tmp/tarballcache
153 #archive_cache_dir = /tmp/tarballcache
154
154
155 ## change this to unique ID for security
155 ## change this to unique ID for security
156 app_instance_uuid = rc-production
156 app_instance_uuid = rc-production
157
157
158 ## cut off limit for large diffs (size in bytes)
158 ## cut off limit for large diffs (size in bytes)
159 cut_off_limit = 256000
159 cut_off_limit = 256000
160
160
161 ## use cache version of scm repo everywhere
161 ## use cache version of scm repo everywhere
162 vcs_full_cache = true
162 vcs_full_cache = true
163
163
164 ## force https in RhodeCode, fixes https redirects, assumes it's always https
164 ## force https in RhodeCode, fixes https redirects, assumes it's always https
165 force_https = false
165 force_https = false
166
166
167 ## use Strict-Transport-Security headers
167 ## use Strict-Transport-Security headers
168 use_htsts = false
168 use_htsts = false
169
169
170 ## number of commits stats will parse on each iteration
170 ## number of commits stats will parse on each iteration
171 commit_parse_limit = 25
171 commit_parse_limit = 25
172
172
173 ## use gravatar service to display avatars
173 ## use gravatar service to display avatars
174 use_gravatar = true
174 use_gravatar = true
175
175
176 ## path to git executable
176 ## path to git executable
177 git_path = git
177 git_path = git
178
178
179 ## git rev filter option, --all is the default filter, if you need to
179 ## git rev filter option, --all is the default filter, if you need to
180 ## hide all refs in changelog switch this to --branches --tags
180 ## hide all refs in changelog switch this to --branches --tags
181 git_rev_filter=--all
181 git_rev_filter=--all
182
182
183 ## RSS feed options
183 ## RSS feed options
184 rss_cut_off_limit = 256000
184 rss_cut_off_limit = 256000
185 rss_items_per_page = 10
185 rss_items_per_page = 10
186 rss_include_diff = false
186 rss_include_diff = false
187
187
188 ## options for showing and identifying changesets
188 ## options for showing and identifying changesets
189 show_sha_length = 12
189 show_sha_length = 12
190 show_revision_number = true
190 show_revision_number = true
191
191
192 ## gist URL alias, used to create nicer urls for gist. This should be an
192 ## gist URL alias, used to create nicer urls for gist. This should be an
193 ## url that does rewrites to _admin/gists/<gistid>.
193 ## url that does rewrites to _admin/gists/<gistid>.
194 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
194 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
195 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
195 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
196 gist_alias_url =
196 gist_alias_url =
197
197
198 ## white list of API enabled controllers. This allows to add list of
198 ## white list of API enabled controllers. This allows to add list of
199 ## controllers to which access will be enabled by api_key. eg: to enable
199 ## controllers to which access will be enabled by api_key. eg: to enable
200 ## api access to raw_files put `FilesController:raw`, to enable access to patches
200 ## api access to raw_files put `FilesController:raw`, to enable access to patches
201 ## add `ChangesetController:changeset_patch`. This list should be "," separated
201 ## add `ChangesetController:changeset_patch`. This list should be "," separated
202 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
202 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
203 ## Recommended settings bellow are commented out:
203 ## Recommended settings bellow are commented out:
204 api_access_controllers_whitelist =
204 api_access_controllers_whitelist =
205 # ChangesetController:changeset_patch,
205 # ChangesetController:changeset_patch,
206 # ChangesetController:changeset_raw,
206 # ChangesetController:changeset_raw,
207 # FilesController:raw,
207 # FilesController:raw,
208 # FilesController:archivefile
208 # FilesController:archivefile
209
209
210 ## alternative_gravatar_url allows you to use your own avatar server application
210 ## alternative_gravatar_url allows you to use your own avatar server application
211 ## the following parts of the URL will be replaced
211 ## the following parts of the URL will be replaced
212 ## {email} user email
212 ## {email} user email
213 ## {md5email} md5 hash of the user email (like at gravatar.com)
213 ## {md5email} md5 hash of the user email (like at gravatar.com)
214 ## {size} size of the image that is expected from the server application
214 ## {size} size of the image that is expected from the server application
215 ## {scheme} http/https from RhodeCode server
215 ## {scheme} http/https from RhodeCode server
216 ## {netloc} network location from RhodeCode server
216 ## {netloc} network location from RhodeCode server
217 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
217 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
218 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
218 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
219
219
220
220
221 ## container auth options
221 ## container auth options
222 container_auth_enabled = false
222 container_auth_enabled = false
223 proxypass_auth_enabled = false
223 proxypass_auth_enabled = false
224
224
225 ## default encoding used to convert from and to unicode
225 ## default encoding used to convert from and to unicode
226 ## can be also a comma seperated list of encoding in case of mixed encodings
226 ## can be also a comma seperated list of encoding in case of mixed encodings
227 default_encoding = utf8
227 default_encoding = utf8
228
228
229 ## overwrite schema of clone url
229 ## overwrite schema of clone url
230 ## available vars:
230 ## available vars:
231 ## scheme - http/https
231 ## scheme - http/https
232 ## user - current user
232 ## user - current user
233 ## pass - password
233 ## pass - password
234 ## netloc - network location
234 ## netloc - network location
235 ## path - usually repo_name
235 ## path - usually repo_name
236
236
237 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
237 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
238
238
239 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
239 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
240 #bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
240 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
241
241
242 ## issue tracking mapping for commits messages
242 ## issue tracking mapping for commits messages
243 ## comment out issue_pat, issue_server, issue_prefix to enable
243 ## comment out issue_pat, issue_server, issue_prefix to enable
244
244
245 ## pattern to get the issues from commit messages
245 ## pattern to get the issues from commit messages
246 ## default one used here is #<numbers> with a regex passive group for `#`
246 ## default one used here is #<numbers> with a regex passive group for `#`
247 ## {id} will be all groups matched from this pattern
247 ## {id} will be all groups matched from this pattern
248
248
249 issue_pat = (?:\s*#)(\d+)
249 issue_pat = (?:\s*#)(\d+)
250
250
251 ## server url to the issue, each {id} will be replaced with match
251 ## server url to the issue, each {id} will be replaced with match
252 ## fetched from the regex and {repo} is replaced with full repository name
252 ## fetched from the regex and {repo} is replaced with full repository name
253 ## including groups {repo_name} is replaced with just name of repo
253 ## including groups {repo_name} is replaced with just name of repo
254
254
255 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
255 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
256
256
257 ## prefix to add to link to indicate it's an url
257 ## prefix to add to link to indicate it's an url
258 ## #314 will be replaced by <issue_prefix><id>
258 ## #314 will be replaced by <issue_prefix><id>
259
259
260 issue_prefix = #
260 issue_prefix = #
261
261
262 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
262 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
263 ## multiple patterns, to other issues server, wiki or others
263 ## multiple patterns, to other issues server, wiki or others
264 ## below an example how to create a wiki pattern
264 ## below an example how to create a wiki pattern
265 # #wiki-some-id -> https://mywiki.com/some-id
265 # #wiki-some-id -> https://mywiki.com/some-id
266
266
267 #issue_pat_wiki = (?:wiki-)(.+)
267 #issue_pat_wiki = (?:wiki-)(.+)
268 #issue_server_link_wiki = https://mywiki.com/{id}
268 #issue_server_link_wiki = https://mywiki.com/{id}
269 #issue_prefix_wiki = WIKI-
269 #issue_prefix_wiki = WIKI-
270
270
271
271
272 ## instance-id prefix
272 ## instance-id prefix
273 ## a prefix key for this instance used for cache invalidation when running
273 ## a prefix key for this instance used for cache invalidation when running
274 ## multiple instances of rhodecode, make sure it's globally unique for
274 ## multiple instances of rhodecode, make sure it's globally unique for
275 ## all running rhodecode instances. Leave empty if you don't use it
275 ## all running rhodecode instances. Leave empty if you don't use it
276 instance_id =
276 instance_id =
277
277
278 ## alternative return HTTP header for failed authentication. Default HTTP
278 ## alternative return HTTP header for failed authentication. Default HTTP
279 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
279 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
280 ## handling that. Set this variable to 403 to return HTTPForbidden
280 ## handling that. Set this variable to 403 to return HTTPForbidden
281 auth_ret_code =
281 auth_ret_code =
282
282
283 ## locking return code. When repository is locked return this HTTP code. 2XX
283 ## locking return code. When repository is locked return this HTTP code. 2XX
284 ## codes don't break the transactions while 4XX codes do
284 ## codes don't break the transactions while 4XX codes do
285 lock_ret_code = 423
285 lock_ret_code = 423
286
286
287 ## allows to change the repository location in settings page
287 ## allows to change the repository location in settings page
288 allow_repo_location_change = True
288 allow_repo_location_change = True
289
289
290 ## allows to setup custom hooks in settings page
290 ## allows to setup custom hooks in settings page
291 allow_custom_hooks_settings = True
291 allow_custom_hooks_settings = True
292
292
293
293
294 ####################################
294 ####################################
295 ### CELERY CONFIG ####
295 ### CELERY CONFIG ####
296 ####################################
296 ####################################
297 use_celery = false
297 use_celery = false
298 broker.host = localhost
298 broker.host = localhost
299 broker.vhost = rabbitmqhost
299 broker.vhost = rabbitmqhost
300 broker.port = 5672
300 broker.port = 5672
301 broker.user = rabbitmq
301 broker.user = rabbitmq
302 broker.password = qweqwe
302 broker.password = qweqwe
303
303
304 celery.imports = rhodecode.lib.celerylib.tasks
304 celery.imports = rhodecode.lib.celerylib.tasks
305
305
306 celery.result.backend = amqp
306 celery.result.backend = amqp
307 celery.result.dburi = amqp://
307 celery.result.dburi = amqp://
308 celery.result.serialier = json
308 celery.result.serialier = json
309
309
310 #celery.send.task.error.emails = true
310 #celery.send.task.error.emails = true
311 #celery.amqp.task.result.expires = 18000
311 #celery.amqp.task.result.expires = 18000
312
312
313 celeryd.concurrency = 2
313 celeryd.concurrency = 2
314 #celeryd.log.file = celeryd.log
314 #celeryd.log.file = celeryd.log
315 celeryd.log.level = debug
315 celeryd.log.level = debug
316 celeryd.max.tasks.per.child = 1
316 celeryd.max.tasks.per.child = 1
317
317
318 ## tasks will never be sent to the queue, but executed locally instead.
318 ## tasks will never be sent to the queue, but executed locally instead.
319 celery.always.eager = false
319 celery.always.eager = false
320
320
321 ####################################
321 ####################################
322 ### BEAKER CACHE ####
322 ### BEAKER CACHE ####
323 ####################################
323 ####################################
324 beaker.cache.data_dir=%(here)s/data/cache/data
324 beaker.cache.data_dir=%(here)s/data/cache/data
325 beaker.cache.lock_dir=%(here)s/data/cache/lock
325 beaker.cache.lock_dir=%(here)s/data/cache/lock
326
326
327 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
327 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
328
328
329 beaker.cache.super_short_term.type=memory
329 beaker.cache.super_short_term.type=memory
330 beaker.cache.super_short_term.expire=10
330 beaker.cache.super_short_term.expire=10
331 beaker.cache.super_short_term.key_length = 256
331 beaker.cache.super_short_term.key_length = 256
332
332
333 beaker.cache.short_term.type=memory
333 beaker.cache.short_term.type=memory
334 beaker.cache.short_term.expire=60
334 beaker.cache.short_term.expire=60
335 beaker.cache.short_term.key_length = 256
335 beaker.cache.short_term.key_length = 256
336
336
337 beaker.cache.long_term.type=memory
337 beaker.cache.long_term.type=memory
338 beaker.cache.long_term.expire=36000
338 beaker.cache.long_term.expire=36000
339 beaker.cache.long_term.key_length = 256
339 beaker.cache.long_term.key_length = 256
340
340
341 beaker.cache.sql_cache_short.type=memory
341 beaker.cache.sql_cache_short.type=memory
342 beaker.cache.sql_cache_short.expire=10
342 beaker.cache.sql_cache_short.expire=10
343 beaker.cache.sql_cache_short.key_length = 256
343 beaker.cache.sql_cache_short.key_length = 256
344
344
345 beaker.cache.sql_cache_med.type=memory
345 beaker.cache.sql_cache_med.type=memory
346 beaker.cache.sql_cache_med.expire=360
346 beaker.cache.sql_cache_med.expire=360
347 beaker.cache.sql_cache_med.key_length = 256
347 beaker.cache.sql_cache_med.key_length = 256
348
348
349 beaker.cache.sql_cache_long.type=file
349 beaker.cache.sql_cache_long.type=file
350 beaker.cache.sql_cache_long.expire=3600
350 beaker.cache.sql_cache_long.expire=3600
351 beaker.cache.sql_cache_long.key_length = 256
351 beaker.cache.sql_cache_long.key_length = 256
352
352
353 ####################################
353 ####################################
354 ### BEAKER SESSION ####
354 ### BEAKER SESSION ####
355 ####################################
355 ####################################
356 ## Type of storage used for the session, current types are
356 ## Type of storage used for the session, current types are
357 ## dbm, file, memcached, database, and memory.
357 ## dbm, file, memcached, database, and memory.
358 ## The storage uses the Container API
358 ## The storage uses the Container API
359 ## that is also used by the cache system.
359 ## that is also used by the cache system.
360
360
361 ## db session ##
361 ## db session ##
362 #beaker.session.type = ext:database
362 #beaker.session.type = ext:database
363 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
363 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
364 #beaker.session.table_name = db_session
364 #beaker.session.table_name = db_session
365
365
366 ## encrypted cookie client side session, good for many instances ##
366 ## encrypted cookie client side session, good for many instances ##
367 #beaker.session.type = cookie
367 #beaker.session.type = cookie
368
368
369 ## file based cookies (default) ##
369 ## file based cookies (default) ##
370 #beaker.session.type = file
370 #beaker.session.type = file
371
371
372 beaker.session.key = rhodecode
372 beaker.session.key = rhodecode
373 beaker.session.secret = production-rc-uytcxaz
373 beaker.session.secret = production-rc-uytcxaz
374
374
375 ## Secure encrypted cookie. Requires AES and AES python libraries
375 ## Secure encrypted cookie. Requires AES and AES python libraries
376 ## you must disable beaker.session.secret to use this
376 ## you must disable beaker.session.secret to use this
377 #beaker.session.encrypt_key = <key_for_encryption>
377 #beaker.session.encrypt_key = <key_for_encryption>
378 #beaker.session.validate_key = <validation_key>
378 #beaker.session.validate_key = <validation_key>
379
379
380 ## sets session as invalid if it haven't been accessed for given amount of time
380 ## sets session as invalid if it haven't been accessed for given amount of time
381 beaker.session.timeout = 2592000
381 beaker.session.timeout = 2592000
382 beaker.session.httponly = true
382 beaker.session.httponly = true
383 #beaker.session.cookie_path = /<your-prefix>
383 #beaker.session.cookie_path = /<your-prefix>
384
384
385 ## uncomment for https secure cookie
385 ## uncomment for https secure cookie
386 beaker.session.secure = false
386 beaker.session.secure = false
387
387
388 ## auto save the session to not to use .save()
388 ## auto save the session to not to use .save()
389 beaker.session.auto = False
389 beaker.session.auto = False
390
390
391 ## default cookie expiration time in seconds `true` expire at browser close ##
391 ## default cookie expiration time in seconds `true` expire at browser close ##
392 #beaker.session.cookie_expires = 3600
392 #beaker.session.cookie_expires = 3600
393
393
394
394
395 ############################
395 ############################
396 ## ERROR HANDLING SYSTEMS ##
396 ## ERROR HANDLING SYSTEMS ##
397 ############################
397 ############################
398
398
399 ####################
399 ####################
400 ### [errormator] ###
400 ### [errormator] ###
401 ####################
401 ####################
402
402
403 ## Errormator is tailored to work with RhodeCode, see
403 ## Errormator is tailored to work with RhodeCode, see
404 ## http://errormator.com for details how to obtain an account
404 ## http://errormator.com for details how to obtain an account
405 ## you must install python package `errormator_client` to make it work
405 ## you must install python package `errormator_client` to make it work
406
406
407 ## errormator enabled
407 ## errormator enabled
408 errormator = false
408 errormator = false
409
409
410 errormator.server_url = https://api.errormator.com
410 errormator.server_url = https://api.errormator.com
411 errormator.api_key = YOUR_API_KEY
411 errormator.api_key = YOUR_API_KEY
412
412
413 ## TWEAK AMOUNT OF INFO SENT HERE
413 ## TWEAK AMOUNT OF INFO SENT HERE
414
414
415 ## enables 404 error logging (default False)
415 ## enables 404 error logging (default False)
416 errormator.report_404 = false
416 errormator.report_404 = false
417
417
418 ## time in seconds after request is considered being slow (default 1)
418 ## time in seconds after request is considered being slow (default 1)
419 errormator.slow_request_time = 1
419 errormator.slow_request_time = 1
420
420
421 ## record slow requests in application
421 ## record slow requests in application
422 ## (needs to be enabled for slow datastore recording and time tracking)
422 ## (needs to be enabled for slow datastore recording and time tracking)
423 errormator.slow_requests = true
423 errormator.slow_requests = true
424
424
425 ## enable hooking to application loggers
425 ## enable hooking to application loggers
426 # errormator.logging = true
426 # errormator.logging = true
427
427
428 ## minimum log level for log capture
428 ## minimum log level for log capture
429 # errormator.logging.level = WARNING
429 # errormator.logging.level = WARNING
430
430
431 ## send logs only from erroneous/slow requests
431 ## send logs only from erroneous/slow requests
432 ## (saves API quota for intensive logging)
432 ## (saves API quota for intensive logging)
433 errormator.logging_on_error = false
433 errormator.logging_on_error = false
434
434
435 ## list of additonal keywords that should be grabbed from environ object
435 ## list of additonal keywords that should be grabbed from environ object
436 ## can be string with comma separated list of words in lowercase
436 ## can be string with comma separated list of words in lowercase
437 ## (by default client will always send following info:
437 ## (by default client will always send following info:
438 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
438 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
439 ## start with HTTP* this list be extended with additional keywords here
439 ## start with HTTP* this list be extended with additional keywords here
440 errormator.environ_keys_whitelist =
440 errormator.environ_keys_whitelist =
441
441
442
442
443 ## list of keywords that should be blanked from request object
443 ## list of keywords that should be blanked from request object
444 ## can be string with comma separated list of words in lowercase
444 ## can be string with comma separated list of words in lowercase
445 ## (by default client will always blank keys that contain following words
445 ## (by default client will always blank keys that contain following words
446 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
446 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
447 ## this list be extended with additional keywords set here
447 ## this list be extended with additional keywords set here
448 errormator.request_keys_blacklist =
448 errormator.request_keys_blacklist =
449
449
450
450
451 ## list of namespaces that should be ignores when gathering log entries
451 ## list of namespaces that should be ignores when gathering log entries
452 ## can be string with comma separated list of namespaces
452 ## can be string with comma separated list of namespaces
453 ## (by default the client ignores own entries: errormator_client.client)
453 ## (by default the client ignores own entries: errormator_client.client)
454 errormator.log_namespace_blacklist =
454 errormator.log_namespace_blacklist =
455
455
456
456
457 ################
457 ################
458 ### [sentry] ###
458 ### [sentry] ###
459 ################
459 ################
460
460
461 ## sentry is a alternative open source error aggregator
461 ## sentry is a alternative open source error aggregator
462 ## you must install python packages `sentry` and `raven` to enable
462 ## you must install python packages `sentry` and `raven` to enable
463
463
464 sentry.dsn = YOUR_DNS
464 sentry.dsn = YOUR_DNS
465 sentry.servers =
465 sentry.servers =
466 sentry.name =
466 sentry.name =
467 sentry.key =
467 sentry.key =
468 sentry.public_key =
468 sentry.public_key =
469 sentry.secret_key =
469 sentry.secret_key =
470 sentry.project =
470 sentry.project =
471 sentry.site =
471 sentry.site =
472 sentry.include_paths =
472 sentry.include_paths =
473 sentry.exclude_paths =
473 sentry.exclude_paths =
474
474
475
475
476 ################################################################################
476 ################################################################################
477 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
477 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
478 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
478 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
479 ## execute malicious code after an exception is raised. ##
479 ## execute malicious code after an exception is raised. ##
480 ################################################################################
480 ################################################################################
481 set debug = false
481 set debug = false
482
482
483 ##################################
483 ##################################
484 ### LOGVIEW CONFIG ###
484 ### LOGVIEW CONFIG ###
485 ##################################
485 ##################################
486 logview.sqlalchemy = #faa
486 logview.sqlalchemy = #faa
487 logview.pylons.templating = #bfb
487 logview.pylons.templating = #bfb
488 logview.pylons.util = #eee
488 logview.pylons.util = #eee
489
489
490 #########################################################
490 #########################################################
491 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
491 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
492 #########################################################
492 #########################################################
493 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
493 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
494 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
494 sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
495 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
495 #sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
496 sqlalchemy.db1.echo = false
496 sqlalchemy.db1.echo = false
497 sqlalchemy.db1.pool_recycle = 3600
497 sqlalchemy.db1.pool_recycle = 3600
498 sqlalchemy.db1.convert_unicode = true
498 sqlalchemy.db1.convert_unicode = true
499
499
500 ################################
500 ################################
501 ### LOGGING CONFIGURATION ####
501 ### LOGGING CONFIGURATION ####
502 ################################
502 ################################
503 [loggers]
503 [loggers]
504 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
504 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
505
505
506 [handlers]
506 [handlers]
507 keys = console, console_sql
507 keys = console, console_sql
508
508
509 [formatters]
509 [formatters]
510 keys = generic, color_formatter, color_formatter_sql
510 keys = generic, color_formatter, color_formatter_sql
511
511
512 #############
512 #############
513 ## LOGGERS ##
513 ## LOGGERS ##
514 #############
514 #############
515 [logger_root]
515 [logger_root]
516 level = NOTSET
516 level = NOTSET
517 handlers = console
517 handlers = console
518
518
519 [logger_routes]
519 [logger_routes]
520 level = DEBUG
520 level = DEBUG
521 handlers =
521 handlers =
522 qualname = routes.middleware
522 qualname = routes.middleware
523 ## "level = DEBUG" logs the route matched and routing variables.
523 ## "level = DEBUG" logs the route matched and routing variables.
524 propagate = 1
524 propagate = 1
525
525
526 [logger_beaker]
526 [logger_beaker]
527 level = DEBUG
527 level = DEBUG
528 handlers =
528 handlers =
529 qualname = beaker.container
529 qualname = beaker.container
530 propagate = 1
530 propagate = 1
531
531
532 [logger_templates]
532 [logger_templates]
533 level = INFO
533 level = INFO
534 handlers =
534 handlers =
535 qualname = pylons.templating
535 qualname = pylons.templating
536 propagate = 1
536 propagate = 1
537
537
538 [logger_rhodecode]
538 [logger_rhodecode]
539 level = DEBUG
539 level = DEBUG
540 handlers =
540 handlers =
541 qualname = rhodecode
541 qualname = rhodecode
542 propagate = 1
542 propagate = 1
543
543
544 [logger_sqlalchemy]
544 [logger_sqlalchemy]
545 level = INFO
545 level = INFO
546 handlers = console_sql
546 handlers = console_sql
547 qualname = sqlalchemy.engine
547 qualname = sqlalchemy.engine
548 propagate = 0
548 propagate = 0
549
549
550 [logger_whoosh_indexer]
550 [logger_whoosh_indexer]
551 level = DEBUG
551 level = DEBUG
552 handlers =
552 handlers =
553 qualname = whoosh_indexer
553 qualname = whoosh_indexer
554 propagate = 1
554 propagate = 1
555
555
556 ##############
556 ##############
557 ## HANDLERS ##
557 ## HANDLERS ##
558 ##############
558 ##############
559
559
560 [handler_console]
560 [handler_console]
561 class = StreamHandler
561 class = StreamHandler
562 args = (sys.stderr,)
562 args = (sys.stderr,)
563 level = INFO
563 level = INFO
564 formatter = generic
564 formatter = generic
565
565
566 [handler_console_sql]
566 [handler_console_sql]
567 class = StreamHandler
567 class = StreamHandler
568 args = (sys.stderr,)
568 args = (sys.stderr,)
569 level = WARN
569 level = WARN
570 formatter = generic
570 formatter = generic
571
571
572 ################
572 ################
573 ## FORMATTERS ##
573 ## FORMATTERS ##
574 ################
574 ################
575
575
576 [formatter_generic]
576 [formatter_generic]
577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
577 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
578 datefmt = %Y-%m-%d %H:%M:%S
578 datefmt = %Y-%m-%d %H:%M:%S
579
579
580 [formatter_color_formatter]
580 [formatter_color_formatter]
581 class=rhodecode.lib.colored_formatter.ColorFormatter
581 class=rhodecode.lib.colored_formatter.ColorFormatter
582 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
582 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
583 datefmt = %Y-%m-%d %H:%M:%S
583 datefmt = %Y-%m-%d %H:%M:%S
584
584
585 [formatter_color_formatter_sql]
585 [formatter_color_formatter_sql]
586 class=rhodecode.lib.colored_formatter.ColorFormatterSql
586 class=rhodecode.lib.colored_formatter.ColorFormatterSql
587 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
587 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
588 datefmt = %Y-%m-%d %H:%M:%S
588 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,609 +1,609 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%text>
2 <%text>
3 ################################################################################
3 ################################################################################
4 ################################################################################
4 ################################################################################
5 # RhodeCode - Example config #
5 # RhodeCode - Example config #
6 # Built-in functions and variables #
6 # Built-in functions and variables #
7 # The ${here} variable will be replaced with the parent directory of this file #
7 # The ${here} variable will be replaced with the parent directory of this file #
8 # ${uuid()} function will generate a unique hash #
8 # ${uuid()} function will generate a unique hash #
9 ################################################################################
9 ################################################################################
10 </%text>
10 </%text>
11 [DEFAULT]
11 [DEFAULT]
12 debug = true
12 debug = true
13 pdebug = false
13 pdebug = false
14 <%text>
14 <%text>
15 ################################################################################
15 ################################################################################
16 ## Uncomment and replace with the address which should receive ##
16 ## Uncomment and replace with the address which should receive ##
17 ## any error reports after application crash ##
17 ## any error reports after application crash ##
18 ## Additionally those settings will be used by RhodeCode mailing system ##
18 ## Additionally those settings will be used by RhodeCode mailing system ##
19 ################################################################################
19 ################################################################################
20 </%text>
20 </%text>
21 #email_to = admin@localhost
21 #email_to = admin@localhost
22 #error_email_from = paste_error@localhost
22 #error_email_from = paste_error@localhost
23 #app_email_from = rhodecode-noreply@localhost
23 #app_email_from = rhodecode-noreply@localhost
24 #error_message =
24 #error_message =
25 #email_prefix = [RhodeCode]
25 #email_prefix = [RhodeCode]
26
26
27 #smtp_server = mail.server.com
27 #smtp_server = mail.server.com
28 #smtp_username =
28 #smtp_username =
29 #smtp_password =
29 #smtp_password =
30 #smtp_port =
30 #smtp_port =
31 #smtp_use_tls = false
31 #smtp_use_tls = false
32 #smtp_use_ssl = true
32 #smtp_use_ssl = true
33 <%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
33 <%text>## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)</%text>
34 #smtp_auth =
34 #smtp_auth =
35
35
36 [server:main]
36 [server:main]
37 %if http_server == 'paste':
37 %if http_server == 'paste':
38 <%text>## PASTE ##</%text>
38 <%text>## PASTE ##</%text>
39 use = egg:Paste#http
39 use = egg:Paste#http
40 <%text>## nr of worker threads to spawn</%text>
40 <%text>## nr of worker threads to spawn</%text>
41 threadpool_workers = 5
41 threadpool_workers = 5
42 <%text>## max request before thread respawn</%text>
42 <%text>## max request before thread respawn</%text>
43 threadpool_max_requests = 10
43 threadpool_max_requests = 10
44 <%text>## option to use threads of process</%text>
44 <%text>## option to use threads of process</%text>
45 use_threadpool = true
45 use_threadpool = true
46 %endif
46 %endif
47 %if http_server == 'waitress':
47 %if http_server == 'waitress':
48 <%text>## WAITRESS ##</%text>
48 <%text>## WAITRESS ##</%text>
49 use = egg:waitress#main
49 use = egg:waitress#main
50 <%text>## number of worker threads</%text>
50 <%text>## number of worker threads</%text>
51 threads = 5
51 threads = 5
52 <%text>## MAX BODY SIZE 100GB</%text>
52 <%text>## MAX BODY SIZE 100GB</%text>
53 max_request_body_size = 107374182400
53 max_request_body_size = 107374182400
54 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
54 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
55 <%text>## windows systems.</%text>
55 <%text>## windows systems.</%text>
56 #asyncore_use_poll = True
56 #asyncore_use_poll = True
57 %endif
57 %endif
58 %if http_server == 'gunicorn':
58 %if http_server == 'gunicorn':
59 <%text>## GUNICORN ##</%text>
59 <%text>## GUNICORN ##</%text>
60 use = egg:gunicorn#main
60 use = egg:gunicorn#main
61 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
61 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
62 <%text>## is set to more than one worker</%text>
62 <%text>## is set to more than one worker</%text>
63 workers = 1
63 workers = 1
64 <%text>## process name</%text>
64 <%text>## process name</%text>
65 proc_name = rhodecode
65 proc_name = rhodecode
66 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
66 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
67 <%text>## recommended for bigger setup is using of of other than sync one</%text>
67 <%text>## recommended for bigger setup is using of of other than sync one</%text>
68 worker_class = sync
68 worker_class = sync
69 max_requests = 1000
69 max_requests = 1000
70 <%text>## ammount of time a worker can handle request before it gets killed and</%text>
70 <%text>## ammount of time a worker can handle request before it gets killed and</%text>
71 <%text>## restarted</%text>
71 <%text>## restarted</%text>
72 timeout = 3600
72 timeout = 3600
73 %endif
73 %endif
74 %if http_server == 'uwsgi':
74 %if http_server == 'uwsgi':
75 <%text>## UWSGI ##</%text>
75 <%text>## UWSGI ##</%text>
76 <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
76 <%text>## run with uwsgi --ini-paste-logged <inifile.ini></%text>
77 [uwsgi]
77 [uwsgi]
78 socket = /tmp/uwsgi.sock
78 socket = /tmp/uwsgi.sock
79 master = true
79 master = true
80 http = 0.0.0.0:5000
80 http = 0.0.0.0:5000
81
81
82 <%text>## set as deamon and redirect all output to file</%text>
82 <%text>## set as deamon and redirect all output to file</%text>
83 #daemonize = ./uwsgi_rhodecode.log
83 #daemonize = ./uwsgi_rhodecode.log
84
84
85 <%text>## master process PID</%text>
85 <%text>## master process PID</%text>
86 pidfile = ./uwsgi_rhodecode.pid
86 pidfile = ./uwsgi_rhodecode.pid
87
87
88 <%text>## stats server with workers statistics, use uwsgitop</%text>
88 <%text>## stats server with workers statistics, use uwsgitop</%text>
89 <%text>## for monitoring</%text>
89 <%text>## for monitoring</%text>
90 stats = 127.0.0.1:1717
90 stats = 127.0.0.1:1717
91 memory-report = true
91 memory-report = true
92
92
93 <%text>## log 5XX errors</%text>
93 <%text>## log 5XX errors</%text>
94 log-5xx = true
94 log-5xx = true
95
95
96 <%text>## Set the socket listen queue size.</%text>
96 <%text>## Set the socket listen queue size.</%text>
97 listen = 256
97 listen = 256
98
98
99 <%text>## Gracefully Reload workers after the specified amount of managed requests</%text>
99 <%text>## Gracefully Reload workers after the specified amount of managed requests</%text>
100 <%text>## (avoid memory leaks).</%text>
100 <%text>## (avoid memory leaks).</%text>
101 max-requests = 1000
101 max-requests = 1000
102
102
103 <%text>## enable large buffers</%text>
103 <%text>## enable large buffers</%text>
104 buffer-size=65535
104 buffer-size=65535
105
105
106 <%text>## socket and http timeouts ##</%text>
106 <%text>## socket and http timeouts ##</%text>
107 http-timeout=3600
107 http-timeout=3600
108 socket-timeout=3600
108 socket-timeout=3600
109
109
110 <%text>## Log requests slower than the specified number of milliseconds.</%text>
110 <%text>## Log requests slower than the specified number of milliseconds.</%text>
111 log-slow = 10
111 log-slow = 10
112
112
113 <%text>## Exit if no app can be loaded.</%text>
113 <%text>## Exit if no app can be loaded.</%text>
114 need-app = true
114 need-app = true
115
115
116 <%text>## Set lazy mode (load apps in workers instead of master).</%text>
116 <%text>## Set lazy mode (load apps in workers instead of master).</%text>
117 lazy = true
117 lazy = true
118
118
119 <%text>## scaling ##</%text>
119 <%text>## scaling ##</%text>
120 <%text>## set cheaper algorithm to use, if not set default will be used</%text>
120 <%text>## set cheaper algorithm to use, if not set default will be used</%text>
121 cheaper-algo = spare
121 cheaper-algo = spare
122
122
123 <%text>## minimum number of workers to keep at all times</%text>
123 <%text>## minimum number of workers to keep at all times</%text>
124 cheaper = 1
124 cheaper = 1
125
125
126 <%text>## number of workers to spawn at startup</%text>
126 <%text>## number of workers to spawn at startup</%text>
127 cheaper-initial = 1
127 cheaper-initial = 1
128
128
129 <%text>## maximum number of workers that can be spawned</%text>
129 <%text>## maximum number of workers that can be spawned</%text>
130 workers = 4
130 workers = 4
131
131
132 <%text>## how many workers should be spawned at a time</%text>
132 <%text>## how many workers should be spawned at a time</%text>
133 cheaper-step = 1
133 cheaper-step = 1
134 %endif
134 %endif
135 <%text>## COMMON ##</%text>
135 <%text>## COMMON ##</%text>
136 host = ${host}
136 host = ${host}
137 port = ${port}
137 port = ${port}
138
138
139 <%text>## prefix middleware for rc</%text>
139 <%text>## prefix middleware for rc</%text>
140 #[filter:proxy-prefix]
140 #[filter:proxy-prefix]
141 #use = egg:PasteDeploy#prefix
141 #use = egg:PasteDeploy#prefix
142 #prefix = /<your-prefix>
142 #prefix = /<your-prefix>
143
143
144 [app:main]
144 [app:main]
145 use = egg:rhodecode
145 use = egg:rhodecode
146 <%text>## enable proxy prefix middleware</%text>
146 <%text>## enable proxy prefix middleware</%text>
147 #filter-with = proxy-prefix
147 #filter-with = proxy-prefix
148
148
149 full_stack = true
149 full_stack = true
150 static_files = true
150 static_files = true
151 <%text>## Optional Languages</%text>
151 <%text>## Optional Languages</%text>
152 <%text>## en, fr, ja, pt_BR, zh_CN, zh_TW, pl, ru</%text>
152 <%text>## en, fr, ja, pt_BR, zh_CN, zh_TW, pl, ru</%text>
153 lang = ${lang}
153 lang = ${lang}
154 cache_dir = ${here}/data
154 cache_dir = ${here}/data
155 index_dir = ${here}/data/index
155 index_dir = ${here}/data/index
156
156
157 <%text>## perform a full repository scan on each server start, this should be</%text>
157 <%text>## perform a full repository scan on each server start, this should be</%text>
158 <%text>## set to false after first startup, to allow faster server restarts.</%text>
158 <%text>## set to false after first startup, to allow faster server restarts.</%text>
159 initial_repo_scan = false
159 initial_repo_scan = false
160
160
161 <%text>## uncomment and set this path to use archive download cache</%text>
161 <%text>## uncomment and set this path to use archive download cache</%text>
162 archive_cache_dir = ${here}/tarballcache
162 archive_cache_dir = ${here}/tarballcache
163
163
164 <%text>## change this to unique ID for security</%text>
164 <%text>## change this to unique ID for security</%text>
165 app_instance_uuid = ${uuid()}
165 app_instance_uuid = ${uuid()}
166
166
167 <%text>## cut off limit for large diffs (size in bytes)</%text>
167 <%text>## cut off limit for large diffs (size in bytes)</%text>
168 cut_off_limit = 256000
168 cut_off_limit = 256000
169
169
170 <%text>## use cache version of scm repo everywhere</%text>
170 <%text>## use cache version of scm repo everywhere</%text>
171 vcs_full_cache = true
171 vcs_full_cache = true
172
172
173 <%text>## force https in RhodeCode, fixes https redirects, assumes it's always https</%text>
173 <%text>## force https in RhodeCode, fixes https redirects, assumes it's always https</%text>
174 force_https = false
174 force_https = false
175
175
176 <%text>## use Strict-Transport-Security headers</%text>
176 <%text>## use Strict-Transport-Security headers</%text>
177 use_htsts = false
177 use_htsts = false
178
178
179 <%text>## number of commits stats will parse on each iteration</%text>
179 <%text>## number of commits stats will parse on each iteration</%text>
180 commit_parse_limit = 25
180 commit_parse_limit = 25
181
181
182 <%text>## use gravatar service to display avatars</%text>
182 <%text>## use gravatar service to display avatars</%text>
183 use_gravatar = true
183 use_gravatar = true
184
184
185 <%text>## path to git executable</%text>
185 <%text>## path to git executable</%text>
186 git_path = git
186 git_path = git
187
187
188 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
188 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
189 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
189 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
190 git_rev_filter=--branches --tags
190 git_rev_filter=--branches --tags
191
191
192 <%text>## RSS feed options</%text>
192 <%text>## RSS feed options</%text>
193 rss_cut_off_limit = 256000
193 rss_cut_off_limit = 256000
194 rss_items_per_page = 10
194 rss_items_per_page = 10
195 rss_include_diff = false
195 rss_include_diff = false
196
196
197 <%text>## options for showing and identifying changesets</%text>
197 <%text>## options for showing and identifying changesets</%text>
198 show_sha_length = 12
198 show_sha_length = 12
199 show_revision_number = true
199 show_revision_number = true
200
200
201 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
201 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
202 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
202 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
203 <%text>## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal</%text>
203 <%text>## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal</%text>
204 <%text>## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid></%text>
204 <%text>## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid></%text>
205 gist_alias_url =
205 gist_alias_url =
206
206
207 <%text>## white list of API enabled controllers. This allows to add list of</%text>
207 <%text>## white list of API enabled controllers. This allows to add list of</%text>
208 <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text>
208 <%text>## controllers to which access will be enabled by api_key. eg: to enable</%text>
209 <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text>
209 <%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text>
210 <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text>
210 <%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text>
211 <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text>
211 <%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text>
212 api_access_controllers_whitelist =
212 api_access_controllers_whitelist =
213
213
214 <%text>## alternative_gravatar_url allows you to use your own avatar server application</%text>
214 <%text>## alternative_gravatar_url allows you to use your own avatar server application</%text>
215 <%text>## the following parts of the URL will be replaced</%text>
215 <%text>## the following parts of the URL will be replaced</%text>
216 <%text>## {email} user email</%text>
216 <%text>## {email} user email</%text>
217 <%text>## {md5email} md5 hash of the user email (like at gravatar.com)</%text>
217 <%text>## {md5email} md5 hash of the user email (like at gravatar.com)</%text>
218 <%text>## {size} size of the image that is expected from the server application</%text>
218 <%text>## {size} size of the image that is expected from the server application</%text>
219 <%text>## {scheme} http/https from RhodeCode server</%text>
219 <%text>## {scheme} http/https from RhodeCode server</%text>
220 <%text>## {netloc} network location from RhodeCode server</%text>
220 <%text>## {netloc} network location from RhodeCode server</%text>
221 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
221 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
222 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
222 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
223
223
224
224
225 <%text>## container auth options</%text>
225 <%text>## container auth options</%text>
226 container_auth_enabled = false
226 container_auth_enabled = false
227 proxypass_auth_enabled = false
227 proxypass_auth_enabled = false
228
228
229 <%text>## default encoding used to convert from and to unicode</%text>
229 <%text>## default encoding used to convert from and to unicode</%text>
230 <%text>## can be also a comma seperated list of encoding in case of mixed encodings</%text>
230 <%text>## can be also a comma seperated list of encoding in case of mixed encodings</%text>
231 default_encoding = utf8
231 default_encoding = utf8
232
232
233 <%text>## overwrite schema of clone url</%text>
233 <%text>## overwrite schema of clone url</%text>
234 <%text>## available vars:</%text>
234 <%text>## available vars:</%text>
235 <%text>## scheme - http/https</%text>
235 <%text>## scheme - http/https</%text>
236 <%text>## user - current user</%text>
236 <%text>## user - current user</%text>
237 <%text>## pass - password</%text>
237 <%text>## pass - password</%text>
238 <%text>## netloc - network location</%text>
238 <%text>## netloc - network location</%text>
239 <%text>## path - usually repo_name</%text>
239 <%text>## path - usually repo_name</%text>
240
240
241 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
241 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
242
242
243 <%text>## issue tracker for RhodeCode (leave blank to disable, absent for default)</%text>
243 <%text>## issue tracker for RhodeCode (leave blank to disable, absent for default)</%text>
244 #bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
244 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
245
245
246 <%text>## issue tracking mapping for commits messages</%text>
246 <%text>## issue tracking mapping for commits messages</%text>
247 <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text>
247 <%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text>
248
248
249 <%text>## pattern to get the issues from commit messages</%text>
249 <%text>## pattern to get the issues from commit messages</%text>
250 <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text>
250 <%text>## default one used here is #<numbers> with a regex passive group for `#`</%text>
251 <%text>## {id} will be all groups matched from this pattern</%text>
251 <%text>## {id} will be all groups matched from this pattern</%text>
252
252
253 issue_pat = (?:\s*#)(\d+)
253 issue_pat = (?:\s*#)(\d+)
254
254
255 <%text>## server url to the issue, each {id} will be replaced with match</%text>
255 <%text>## server url to the issue, each {id} will be replaced with match</%text>
256 <%text>## fetched from the regex and {repo} is replaced with full repository name</%text>
256 <%text>## fetched from the regex and {repo} is replaced with full repository name</%text>
257 <%text>## including groups {repo_name} is replaced with just name of repo</%text>
257 <%text>## including groups {repo_name} is replaced with just name of repo</%text>
258
258
259 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
259 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
260
260
261 <%text>## prefix to add to link to indicate it's an url</%text>
261 <%text>## prefix to add to link to indicate it's an url</%text>
262 <%text>## #314 will be replaced by <issue_prefix><id></%text>
262 <%text>## #314 will be replaced by <issue_prefix><id></%text>
263
263
264 issue_prefix = #
264 issue_prefix = #
265
265
266 <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text>
266 <%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text>
267 <%text>## multiple patterns, to other issues server, wiki or others</%text>
267 <%text>## multiple patterns, to other issues server, wiki or others</%text>
268 <%text>## below an example how to create a wiki pattern</%text>
268 <%text>## below an example how to create a wiki pattern</%text>
269 <%text>## wiki-some-id -> https://mywiki.com/some-id</%text>
269 <%text>## wiki-some-id -> https://mywiki.com/some-id</%text>
270
270
271 #issue_pat_wiki = (?:wiki-)(.+)
271 #issue_pat_wiki = (?:wiki-)(.+)
272 #issue_server_link_wiki = https://mywiki.com/{id}
272 #issue_server_link_wiki = https://mywiki.com/{id}
273 #issue_prefix_wiki = WIKI-
273 #issue_prefix_wiki = WIKI-
274
274
275
275
276 <%text>## instance-id prefix</%text>
276 <%text>## instance-id prefix</%text>
277 <%text>## a prefix key for this instance used for cache invalidation when running</%text>
277 <%text>## a prefix key for this instance used for cache invalidation when running</%text>
278 <%text>## multiple instances of rhodecode, make sure it's globally unique for</%text>
278 <%text>## multiple instances of rhodecode, make sure it's globally unique for</%text>
279 <%text>## all running rhodecode instances. Leave empty if you don't use it</%text>
279 <%text>## all running rhodecode instances. Leave empty if you don't use it</%text>
280 instance_id =
280 instance_id =
281
281
282 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
282 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
283 <%text>## response is 401 HTTPUnauthorized. Currently HG clients have troubles with</%text>
283 <%text>## response is 401 HTTPUnauthorized. Currently HG clients have troubles with</%text>
284 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
284 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
285 auth_ret_code =
285 auth_ret_code =
286
286
287 <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text>
287 <%text>## locking return code. When repository is locked return this HTTP code. 2XX</%text>
288 <%text>## codes don't break the transactions while 4XX codes do</%text>
288 <%text>## codes don't break the transactions while 4XX codes do</%text>
289 lock_ret_code = 423
289 lock_ret_code = 423
290
290
291 <%text>## allows to change the repository location in settings page</%text>
291 <%text>## allows to change the repository location in settings page</%text>
292 allow_repo_location_change = True
292 allow_repo_location_change = True
293
293
294 <%text>## allows to setup custom hooks in settings page</%text>
294 <%text>## allows to setup custom hooks in settings page</%text>
295 allow_custom_hooks_settings = True
295 allow_custom_hooks_settings = True
296
296
297 <%text>
297 <%text>
298 ####################################
298 ####################################
299 ### CELERY CONFIG ####
299 ### CELERY CONFIG ####
300 ####################################
300 ####################################
301 </%text>
301 </%text>
302 use_celery = false
302 use_celery = false
303 broker.host = localhost
303 broker.host = localhost
304 broker.vhost = rabbitmqhost
304 broker.vhost = rabbitmqhost
305 broker.port = 5672
305 broker.port = 5672
306 broker.user = rabbitmq
306 broker.user = rabbitmq
307 broker.password = qweqwe
307 broker.password = qweqwe
308
308
309 celery.imports = rhodecode.lib.celerylib.tasks
309 celery.imports = rhodecode.lib.celerylib.tasks
310
310
311 celery.result.backend = amqp
311 celery.result.backend = amqp
312 celery.result.dburi = amqp://
312 celery.result.dburi = amqp://
313 celery.result.serialier = json
313 celery.result.serialier = json
314
314
315 #celery.send.task.error.emails = true
315 #celery.send.task.error.emails = true
316 #celery.amqp.task.result.expires = 18000
316 #celery.amqp.task.result.expires = 18000
317
317
318 celeryd.concurrency = 2
318 celeryd.concurrency = 2
319 #celeryd.log.file = celeryd.log
319 #celeryd.log.file = celeryd.log
320 celeryd.log.level = debug
320 celeryd.log.level = debug
321 celeryd.max.tasks.per.child = 1
321 celeryd.max.tasks.per.child = 1
322
322
323 <%text>## tasks will never be sent to the queue, but executed locally instead.</%text>
323 <%text>## tasks will never be sent to the queue, but executed locally instead.</%text>
324 celery.always.eager = false
324 celery.always.eager = false
325 <%text>
325 <%text>
326 ####################################
326 ####################################
327 ### BEAKER CACHE ####
327 ### BEAKER CACHE ####
328 ####################################
328 ####################################
329 </%text>
329 </%text>
330 beaker.cache.data_dir=${here}/data/cache/data
330 beaker.cache.data_dir=${here}/data/cache/data
331 beaker.cache.lock_dir=${here}/data/cache/lock
331 beaker.cache.lock_dir=${here}/data/cache/lock
332
332
333 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
333 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
334
334
335 beaker.cache.super_short_term.type=memory
335 beaker.cache.super_short_term.type=memory
336 beaker.cache.super_short_term.expire=10
336 beaker.cache.super_short_term.expire=10
337 beaker.cache.super_short_term.key_length = 256
337 beaker.cache.super_short_term.key_length = 256
338
338
339 beaker.cache.short_term.type=memory
339 beaker.cache.short_term.type=memory
340 beaker.cache.short_term.expire=60
340 beaker.cache.short_term.expire=60
341 beaker.cache.short_term.key_length = 256
341 beaker.cache.short_term.key_length = 256
342
342
343 beaker.cache.long_term.type=memory
343 beaker.cache.long_term.type=memory
344 beaker.cache.long_term.expire=36000
344 beaker.cache.long_term.expire=36000
345 beaker.cache.long_term.key_length = 256
345 beaker.cache.long_term.key_length = 256
346
346
347 beaker.cache.sql_cache_short.type=memory
347 beaker.cache.sql_cache_short.type=memory
348 beaker.cache.sql_cache_short.expire=10
348 beaker.cache.sql_cache_short.expire=10
349 beaker.cache.sql_cache_short.key_length = 256
349 beaker.cache.sql_cache_short.key_length = 256
350
350
351 beaker.cache.sql_cache_med.type=memory
351 beaker.cache.sql_cache_med.type=memory
352 beaker.cache.sql_cache_med.expire=360
352 beaker.cache.sql_cache_med.expire=360
353 beaker.cache.sql_cache_med.key_length = 256
353 beaker.cache.sql_cache_med.key_length = 256
354
354
355 beaker.cache.sql_cache_long.type=file
355 beaker.cache.sql_cache_long.type=file
356 beaker.cache.sql_cache_long.expire=3600
356 beaker.cache.sql_cache_long.expire=3600
357 beaker.cache.sql_cache_long.key_length = 256
357 beaker.cache.sql_cache_long.key_length = 256
358 <%text>
358 <%text>
359 ####################################
359 ####################################
360 ### BEAKER SESSION ####
360 ### BEAKER SESSION ####
361 ####################################
361 ####################################
362 ## Type of storage used for the session, current types are
362 ## Type of storage used for the session, current types are
363 ## dbm, file, memcached, database, and memory.
363 ## dbm, file, memcached, database, and memory.
364 ## The storage uses the Container API
364 ## The storage uses the Container API
365 ## that is also used by the cache system.
365 ## that is also used by the cache system.
366 </%text>
366 </%text>
367 <%text>## db session ##</%text>
367 <%text>## db session ##</%text>
368 #beaker.session.type = ext:database
368 #beaker.session.type = ext:database
369 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
369 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
370 #beaker.session.table_name = db_session
370 #beaker.session.table_name = db_session
371
371
372 <%text>## encrypted cookie client side session, good for many instances ##</%text>
372 <%text>## encrypted cookie client side session, good for many instances ##</%text>
373 #beaker.session.type = cookie
373 #beaker.session.type = cookie
374
374
375 <%text>## file based cookies (default) ##</%text>
375 <%text>## file based cookies (default) ##</%text>
376 #beaker.session.type = file
376 #beaker.session.type = file
377
377
378 beaker.session.key = rhodecode
378 beaker.session.key = rhodecode
379 beaker.session.secret = ${uuid()}
379 beaker.session.secret = ${uuid()}
380
380
381 <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text>
381 <%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text>
382 <%text>## you must disable beaker.session.secret to use this</%text>
382 <%text>## you must disable beaker.session.secret to use this</%text>
383 #beaker.session.encrypt_key = <key_for_encryption>
383 #beaker.session.encrypt_key = <key_for_encryption>
384 #beaker.session.validate_key = <validation_key>
384 #beaker.session.validate_key = <validation_key>
385
385
386 <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text>
386 <%text>## sets session as invalid if it haven't been accessed for given amount of time</%text>
387 beaker.session.timeout = 2592000
387 beaker.session.timeout = 2592000
388 beaker.session.httponly = true
388 beaker.session.httponly = true
389 #beaker.session.cookie_path = /<your-prefix>
389 #beaker.session.cookie_path = /<your-prefix>
390
390
391 <%text>## uncomment for https secure cookie</%text>
391 <%text>## uncomment for https secure cookie</%text>
392 beaker.session.secure = false
392 beaker.session.secure = false
393
393
394 <%text>## auto save the session to not to use .save()</%text>
394 <%text>## auto save the session to not to use .save()</%text>
395 beaker.session.auto = False
395 beaker.session.auto = False
396
396
397 <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text>
397 <%text>## default cookie expiration time in seconds `true` expire at browser close ##</%text>
398 #beaker.session.cookie_expires = 3600
398 #beaker.session.cookie_expires = 3600
399
399
400 %if error_aggregation_service == 'errormator':
400 %if error_aggregation_service == 'errormator':
401 <%text>
401 <%text>
402 ############################
402 ############################
403 ## ERROR HANDLING SYSTEMS ##
403 ## ERROR HANDLING SYSTEMS ##
404 ############################
404 ############################
405
405
406 ####################
406 ####################
407 ### [errormator] ###
407 ### [errormator] ###
408 ####################
408 ####################
409
409
410 ## Errormator is tailored to work with RhodeCode, see
410 ## Errormator is tailored to work with RhodeCode, see
411 ## http://errormator.com for details how to obtain an account
411 ## http://errormator.com for details how to obtain an account
412 ## you must install python package `errormator_client` to make it work
412 ## you must install python package `errormator_client` to make it work
413 </%text>
413 </%text>
414 <%text>## errormator enabled</%text>
414 <%text>## errormator enabled</%text>
415 errormator = false
415 errormator = false
416
416
417 errormator.server_url = https://api.errormator.com
417 errormator.server_url = https://api.errormator.com
418 errormator.api_key = YOUR_API_KEY
418 errormator.api_key = YOUR_API_KEY
419
419
420 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
420 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
421
421
422 <%text>## enables 404 error logging (default False)</%text>
422 <%text>## enables 404 error logging (default False)</%text>
423 errormator.report_404 = false
423 errormator.report_404 = false
424
424
425 <%text>## time in seconds after request is considered being slow (default 1)</%text>
425 <%text>## time in seconds after request is considered being slow (default 1)</%text>
426 errormator.slow_request_time = 1
426 errormator.slow_request_time = 1
427
427
428 <%text>## record slow requests in application</%text>
428 <%text>## record slow requests in application</%text>
429 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
429 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
430 errormator.slow_requests = true
430 errormator.slow_requests = true
431
431
432 <%text>## enable hooking to application loggers</%text>
432 <%text>## enable hooking to application loggers</%text>
433 # errormator.logging = true
433 # errormator.logging = true
434
434
435 <%text>## minimum log level for log capture</%text>
435 <%text>## minimum log level for log capture</%text>
436 # errormator.logging.level = WARNING
436 # errormator.logging.level = WARNING
437
437
438 <%text>## send logs only from erroneous/slow requests</%text>
438 <%text>## send logs only from erroneous/slow requests</%text>
439 <%text>## (saves API quota for intensive logging)</%text>
439 <%text>## (saves API quota for intensive logging)</%text>
440 errormator.logging_on_error = false
440 errormator.logging_on_error = false
441
441
442 <%text>## list of additonal keywords that should be grabbed from environ object</%text>
442 <%text>## list of additonal keywords that should be grabbed from environ object</%text>
443 <%text>## can be string with comma separated list of words in lowercase</%text>
443 <%text>## can be string with comma separated list of words in lowercase</%text>
444 <%text>## (by default client will always send following info:</%text>
444 <%text>## (by default client will always send following info:</%text>
445 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
445 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
446 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
446 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
447 errormator.environ_keys_whitelist =
447 errormator.environ_keys_whitelist =
448
448
449
449
450 <%text>## list of keywords that should be blanked from request object</%text>
450 <%text>## list of keywords that should be blanked from request object</%text>
451 <%text>## can be string with comma separated list of words in lowercase</%text>
451 <%text>## can be string with comma separated list of words in lowercase</%text>
452 <%text>## (by default client will always blank keys that contain following words</%text>
452 <%text>## (by default client will always blank keys that contain following words</%text>
453 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
453 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
454 <%text>## this list be extended with additional keywords set here</%text>
454 <%text>## this list be extended with additional keywords set here</%text>
455 errormator.request_keys_blacklist =
455 errormator.request_keys_blacklist =
456
456
457
457
458 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
458 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
459 <%text>## can be string with comma separated list of namespaces</%text>
459 <%text>## can be string with comma separated list of namespaces</%text>
460 <%text>## (by default the client ignores own entries: errormator_client.client)</%text>
460 <%text>## (by default the client ignores own entries: errormator_client.client)</%text>
461 errormator.log_namespace_blacklist =
461 errormator.log_namespace_blacklist =
462 %elif error_aggregation_service == 'sentry':
462 %elif error_aggregation_service == 'sentry':
463 <%text>
463 <%text>
464 ################
464 ################
465 ### [sentry] ###
465 ### [sentry] ###
466 ################
466 ################
467
467
468 ## sentry is a alternative open source error aggregator
468 ## sentry is a alternative open source error aggregator
469 ## you must install python packages `sentry` and `raven` to enable
469 ## you must install python packages `sentry` and `raven` to enable
470 </%text>
470 </%text>
471 sentry.dsn = YOUR_DNS
471 sentry.dsn = YOUR_DNS
472 sentry.servers =
472 sentry.servers =
473 sentry.name =
473 sentry.name =
474 sentry.key =
474 sentry.key =
475 sentry.public_key =
475 sentry.public_key =
476 sentry.secret_key =
476 sentry.secret_key =
477 sentry.project =
477 sentry.project =
478 sentry.site =
478 sentry.site =
479 sentry.include_paths =
479 sentry.include_paths =
480 sentry.exclude_paths =
480 sentry.exclude_paths =
481 %endif
481 %endif
482 <%text>
482 <%text>
483 ################################################################################
483 ################################################################################
484 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
484 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
485 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
485 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
486 ## execute malicious code after an exception is raised. ##
486 ## execute malicious code after an exception is raised. ##
487 ################################################################################
487 ################################################################################
488 </%text>
488 </%text>
489 set debug = false
489 set debug = false
490 <%text>
490 <%text>
491 ##################################
491 ##################################
492 ### LOGVIEW CONFIG ###
492 ### LOGVIEW CONFIG ###
493 ##################################
493 ##################################
494 </%text>
494 </%text>
495 logview.sqlalchemy = #faa
495 logview.sqlalchemy = #faa
496 logview.pylons.templating = #bfb
496 logview.pylons.templating = #bfb
497 logview.pylons.util = #eee
497 logview.pylons.util = #eee
498 <%text>
498 <%text>
499 #########################################################
499 #########################################################
500 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
500 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
501 #########################################################
501 #########################################################
502 </%text>
502 </%text>
503 %if database_engine == 'sqlite':
503 %if database_engine == 'sqlite':
504 # SQLITE [default]
504 # SQLITE [default]
505 sqlalchemy.db1.url = sqlite:///${here}/rhodecode.db?timeout=60
505 sqlalchemy.db1.url = sqlite:///${here}/rhodecode.db?timeout=60
506 %elif database_engine == 'postgres':
506 %elif database_engine == 'postgres':
507 # POSTGRESQL
507 # POSTGRESQL
508 sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
508 sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
509 %elif database_engine == 'mysql':
509 %elif database_engine == 'mysql':
510 # MySQL
510 # MySQL
511 sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
511 sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
512 %endif
512 %endif
513 # see sqlalchemy docs for others
513 # see sqlalchemy docs for others
514
514
515 sqlalchemy.db1.echo = false
515 sqlalchemy.db1.echo = false
516 sqlalchemy.db1.pool_recycle = 3600
516 sqlalchemy.db1.pool_recycle = 3600
517 sqlalchemy.db1.convert_unicode = true
517 sqlalchemy.db1.convert_unicode = true
518 <%text>
518 <%text>
519 ################################
519 ################################
520 ### LOGGING CONFIGURATION ####
520 ### LOGGING CONFIGURATION ####
521 ################################
521 ################################
522 </%text>
522 </%text>
523 [loggers]
523 [loggers]
524 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
524 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
525
525
526 [handlers]
526 [handlers]
527 keys = console, console_sql
527 keys = console, console_sql
528
528
529 [formatters]
529 [formatters]
530 keys = generic, color_formatter, color_formatter_sql
530 keys = generic, color_formatter, color_formatter_sql
531 <%text>
531 <%text>
532 #############
532 #############
533 ## LOGGERS ##
533 ## LOGGERS ##
534 #############
534 #############
535 </%text>
535 </%text>
536 [logger_root]
536 [logger_root]
537 level = NOTSET
537 level = NOTSET
538 handlers = console
538 handlers = console
539
539
540 [logger_routes]
540 [logger_routes]
541 level = DEBUG
541 level = DEBUG
542 handlers =
542 handlers =
543 qualname = routes.middleware
543 qualname = routes.middleware
544 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
544 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
545 propagate = 1
545 propagate = 1
546
546
547 [logger_beaker]
547 [logger_beaker]
548 level = DEBUG
548 level = DEBUG
549 handlers =
549 handlers =
550 qualname = beaker.container
550 qualname = beaker.container
551 propagate = 1
551 propagate = 1
552
552
553 [logger_templates]
553 [logger_templates]
554 level = INFO
554 level = INFO
555 handlers =
555 handlers =
556 qualname = pylons.templating
556 qualname = pylons.templating
557 propagate = 1
557 propagate = 1
558
558
559 [logger_rhodecode]
559 [logger_rhodecode]
560 level = DEBUG
560 level = DEBUG
561 handlers =
561 handlers =
562 qualname = rhodecode
562 qualname = rhodecode
563 propagate = 1
563 propagate = 1
564
564
565 [logger_sqlalchemy]
565 [logger_sqlalchemy]
566 level = INFO
566 level = INFO
567 handlers = console_sql
567 handlers = console_sql
568 qualname = sqlalchemy.engine
568 qualname = sqlalchemy.engine
569 propagate = 0
569 propagate = 0
570
570
571 [logger_whoosh_indexer]
571 [logger_whoosh_indexer]
572 level = DEBUG
572 level = DEBUG
573 handlers =
573 handlers =
574 qualname = whoosh_indexer
574 qualname = whoosh_indexer
575 propagate = 1
575 propagate = 1
576 <%text>
576 <%text>
577 ##############
577 ##############
578 ## HANDLERS ##
578 ## HANDLERS ##
579 ##############
579 ##############
580 </%text>
580 </%text>
581 [handler_console]
581 [handler_console]
582 class = StreamHandler
582 class = StreamHandler
583 args = (sys.stderr,)
583 args = (sys.stderr,)
584 level = INFO
584 level = INFO
585 formatter = generic
585 formatter = generic
586
586
587 [handler_console_sql]
587 [handler_console_sql]
588 class = StreamHandler
588 class = StreamHandler
589 args = (sys.stderr,)
589 args = (sys.stderr,)
590 level = WARN
590 level = WARN
591 formatter = generic
591 formatter = generic
592 <%text>
592 <%text>
593 ################
593 ################
594 ## FORMATTERS ##
594 ## FORMATTERS ##
595 ################
595 ################
596 </%text>
596 </%text>
597 [formatter_generic]
597 [formatter_generic]
598 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
598 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
599 datefmt = %Y-%m-%d %H:%M:%S
599 datefmt = %Y-%m-%d %H:%M:%S
600
600
601 [formatter_color_formatter]
601 [formatter_color_formatter]
602 class=rhodecode.lib.colored_formatter.ColorFormatter
602 class=rhodecode.lib.colored_formatter.ColorFormatter
603 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
603 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
604 datefmt = %Y-%m-%d %H:%M:%S
604 datefmt = %Y-%m-%d %H:%M:%S
605
605
606 [formatter_color_formatter_sql]
606 [formatter_color_formatter_sql]
607 class=rhodecode.lib.colored_formatter.ColorFormatterSql
607 class=rhodecode.lib.colored_formatter.ColorFormatterSql
608 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
608 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
609 datefmt = %Y-%m-%d %H:%M:%S
609 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,597 +1,597 b''
1 ################################################################################
1 ################################################################################
2 ################################################################################
2 ################################################################################
3 # RhodeCode - Pylons environment configuration #
3 # RhodeCode - Pylons environment configuration #
4 # #
4 # #
5 # The %(here)s variable will be replaced with the parent directory of this file#
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
6 ################################################################################
7
7
8 [DEFAULT]
8 [DEFAULT]
9 debug = true
9 debug = true
10 pdebug = false
10 pdebug = false
11 ################################################################################
11 ################################################################################
12 ## Uncomment and replace with the address which should receive ##
12 ## Uncomment and replace with the address which should receive ##
13 ## any error reports after application crash ##
13 ## any error reports after application crash ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
14 ## Additionally those settings will be used by RhodeCode mailing system ##
15 ################################################################################
15 ################################################################################
16 #email_to = admin@localhost
16 #email_to = admin@localhost
17 #error_email_from = paste_error@localhost
17 #error_email_from = paste_error@localhost
18 #app_email_from = rhodecode-noreply@localhost
18 #app_email_from = rhodecode-noreply@localhost
19 #error_message =
19 #error_message =
20 #email_prefix = [RhodeCode]
20 #email_prefix = [RhodeCode]
21
21
22 #smtp_server = mail.server.com
22 #smtp_server = mail.server.com
23 #smtp_username =
23 #smtp_username =
24 #smtp_password =
24 #smtp_password =
25 #smtp_port =
25 #smtp_port =
26 #smtp_use_tls = false
26 #smtp_use_tls = false
27 #smtp_use_ssl = true
27 #smtp_use_ssl = true
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
28 ## Specify available auth parameters here (e.g. LOGIN PLAIN CRAM-MD5, etc.)
29 #smtp_auth =
29 #smtp_auth =
30
30
31 [server:main]
31 [server:main]
32 ## PASTE ##
32 ## PASTE ##
33 #use = egg:Paste#http
33 #use = egg:Paste#http
34 ## nr of worker threads to spawn
34 ## nr of worker threads to spawn
35 #threadpool_workers = 5
35 #threadpool_workers = 5
36 ## max request before thread respawn
36 ## max request before thread respawn
37 #threadpool_max_requests = 10
37 #threadpool_max_requests = 10
38 ## option to use threads of process
38 ## option to use threads of process
39 #use_threadpool = true
39 #use_threadpool = true
40
40
41 ## WAITRESS ##
41 ## WAITRESS ##
42 use = egg:waitress#main
42 use = egg:waitress#main
43 ## number of worker threads
43 ## number of worker threads
44 threads = 5
44 threads = 5
45 ## MAX BODY SIZE 100GB
45 ## MAX BODY SIZE 100GB
46 max_request_body_size = 107374182400
46 max_request_body_size = 107374182400
47 ## use poll instead of select, fixes fd limits, may not work on old
47 ## use poll instead of select, fixes fd limits, may not work on old
48 ## windows systems.
48 ## windows systems.
49 #asyncore_use_poll = True
49 #asyncore_use_poll = True
50
50
51 ## GUNICORN ##
51 ## GUNICORN ##
52 #use = egg:gunicorn#main
52 #use = egg:gunicorn#main
53 ## number of process workers. You must set `instance_id = *` when this option
53 ## number of process workers. You must set `instance_id = *` when this option
54 ## is set to more than one worker
54 ## is set to more than one worker
55 #workers = 1
55 #workers = 1
56 ## process name
56 ## process name
57 #proc_name = rhodecode
57 #proc_name = rhodecode
58 ## type of worker class, one of sync, eventlet, gevent, tornado
58 ## type of worker class, one of sync, eventlet, gevent, tornado
59 ## recommended for bigger setup is using of of other than sync one
59 ## recommended for bigger setup is using of of other than sync one
60 #worker_class = sync
60 #worker_class = sync
61 #max_requests = 5
61 #max_requests = 5
62 ## ammount of time a worker can handle request before it gets killed and
62 ## ammount of time a worker can handle request before it gets killed and
63 ## restarted
63 ## restarted
64 #timeout = 3600
64 #timeout = 3600
65
65
66 ## UWSGI ##
66 ## UWSGI ##
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
67 ## run with uwsgi --ini-paste-logged <inifile.ini>
68 #[uwsgi]
68 #[uwsgi]
69 #socket = /tmp/uwsgi.sock
69 #socket = /tmp/uwsgi.sock
70 #master = true
70 #master = true
71 #http = 127.0.0.1:5000
71 #http = 127.0.0.1:5000
72
72
73 ## set as deamon and redirect all output to file
73 ## set as deamon and redirect all output to file
74 #daemonize = ./uwsgi_rhodecode.log
74 #daemonize = ./uwsgi_rhodecode.log
75
75
76 ## master process PID
76 ## master process PID
77 #pidfile = ./uwsgi_rhodecode.pid
77 #pidfile = ./uwsgi_rhodecode.pid
78
78
79 ## stats server with workers statistics, use uwsgitop
79 ## stats server with workers statistics, use uwsgitop
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
80 ## for monitoring, `uwsgitop 127.0.0.1:1717`
81 #stats = 127.0.0.1:1717
81 #stats = 127.0.0.1:1717
82 #memory-report = true
82 #memory-report = true
83
83
84 ## log 5XX errors
84 ## log 5XX errors
85 #log-5xx = true
85 #log-5xx = true
86
86
87 ## Set the socket listen queue size.
87 ## Set the socket listen queue size.
88 #listen = 256
88 #listen = 256
89
89
90 ## Gracefully Reload workers after the specified amount of managed requests
90 ## Gracefully Reload workers after the specified amount of managed requests
91 ## (avoid memory leaks).
91 ## (avoid memory leaks).
92 #max-requests = 1000
92 #max-requests = 1000
93
93
94 ## enable large buffers
94 ## enable large buffers
95 #buffer-size=65535
95 #buffer-size=65535
96
96
97 ## socket and http timeouts ##
97 ## socket and http timeouts ##
98 #http-timeout=3600
98 #http-timeout=3600
99 #socket-timeout=3600
99 #socket-timeout=3600
100
100
101 ## Log requests slower than the specified number of milliseconds.
101 ## Log requests slower than the specified number of milliseconds.
102 #log-slow = 10
102 #log-slow = 10
103
103
104 ## Exit if no app can be loaded.
104 ## Exit if no app can be loaded.
105 #need-app = true
105 #need-app = true
106
106
107 ## Set lazy mode (load apps in workers instead of master).
107 ## Set lazy mode (load apps in workers instead of master).
108 #lazy = true
108 #lazy = true
109
109
110 ## scaling ##
110 ## scaling ##
111 ## set cheaper algorithm to use, if not set default will be used
111 ## set cheaper algorithm to use, if not set default will be used
112 #cheaper-algo = spare
112 #cheaper-algo = spare
113
113
114 ## minimum number of workers to keep at all times
114 ## minimum number of workers to keep at all times
115 #cheaper = 1
115 #cheaper = 1
116
116
117 ## number of workers to spawn at startup
117 ## number of workers to spawn at startup
118 #cheaper-initial = 1
118 #cheaper-initial = 1
119
119
120 ## maximum number of workers that can be spawned
120 ## maximum number of workers that can be spawned
121 #workers = 4
121 #workers = 4
122
122
123 ## how many workers should be spawned at a time
123 ## how many workers should be spawned at a time
124 #cheaper-step = 1
124 #cheaper-step = 1
125
125
126 ## COMMON ##
126 ## COMMON ##
127 host = 127.0.0.1
127 host = 127.0.0.1
128 port = 5000
128 port = 5000
129
129
130 ## prefix middleware for rc
130 ## prefix middleware for rc
131 #[filter:proxy-prefix]
131 #[filter:proxy-prefix]
132 #use = egg:PasteDeploy#prefix
132 #use = egg:PasteDeploy#prefix
133 #prefix = /<your-prefix>
133 #prefix = /<your-prefix>
134
134
135 [app:main]
135 [app:main]
136 use = egg:rhodecode
136 use = egg:rhodecode
137 ## enable proxy prefix middleware
137 ## enable proxy prefix middleware
138 #filter-with = proxy-prefix
138 #filter-with = proxy-prefix
139
139
140 full_stack = true
140 full_stack = true
141 static_files = true
141 static_files = true
142 ## Optional Languages
142 ## Optional Languages
143 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
143 ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
144 lang = en
144 lang = en
145 cache_dir = %(here)s/data
145 cache_dir = %(here)s/data
146 index_dir = %(here)s/data/index
146 index_dir = %(here)s/data/index
147
147
148 ## perform a full repository scan on each server start, this should be
148 ## perform a full repository scan on each server start, this should be
149 ## set to false after first startup, to allow faster server restarts.
149 ## set to false after first startup, to allow faster server restarts.
150 initial_repo_scan = true
150 initial_repo_scan = true
151
151
152 ## uncomment and set this path to use archive download cache
152 ## uncomment and set this path to use archive download cache
153 #archive_cache_dir = /tmp/tarballcache
153 #archive_cache_dir = /tmp/tarballcache
154
154
155 ## change this to unique ID for security
155 ## change this to unique ID for security
156 app_instance_uuid = ${app_instance_uuid}
156 app_instance_uuid = ${app_instance_uuid}
157
157
158 ## cut off limit for large diffs (size in bytes)
158 ## cut off limit for large diffs (size in bytes)
159 cut_off_limit = 256000
159 cut_off_limit = 256000
160
160
161 ## use cache version of scm repo everywhere
161 ## use cache version of scm repo everywhere
162 vcs_full_cache = true
162 vcs_full_cache = true
163
163
164 ## force https in RhodeCode, fixes https redirects, assumes it's always https
164 ## force https in RhodeCode, fixes https redirects, assumes it's always https
165 force_https = false
165 force_https = false
166
166
167 ## use Strict-Transport-Security headers
167 ## use Strict-Transport-Security headers
168 use_htsts = false
168 use_htsts = false
169
169
170 ## number of commits stats will parse on each iteration
170 ## number of commits stats will parse on each iteration
171 commit_parse_limit = 25
171 commit_parse_limit = 25
172
172
173 ## use gravatar service to display avatars
173 ## use gravatar service to display avatars
174 use_gravatar = true
174 use_gravatar = true
175
175
176 ## path to git executable
176 ## path to git executable
177 git_path = git
177 git_path = git
178
178
179 ## git rev filter option, --all is the default filter, if you need to
179 ## git rev filter option, --all is the default filter, if you need to
180 ## hide all refs in changelog switch this to --branches --tags
180 ## hide all refs in changelog switch this to --branches --tags
181 git_rev_filter=--all
181 git_rev_filter=--all
182
182
183 ## RSS feed options
183 ## RSS feed options
184 rss_cut_off_limit = 256000
184 rss_cut_off_limit = 256000
185 rss_items_per_page = 10
185 rss_items_per_page = 10
186 rss_include_diff = false
186 rss_include_diff = false
187
187
188 ## options for showing and identifying changesets
188 ## options for showing and identifying changesets
189 show_sha_length = 12
189 show_sha_length = 12
190 show_revision_number = true
190 show_revision_number = true
191
191
192 ## gist URL alias, used to create nicer urls for gist. This should be an
192 ## gist URL alias, used to create nicer urls for gist. This should be an
193 ## url that does rewrites to _admin/gists/<gistid>.
193 ## url that does rewrites to _admin/gists/<gistid>.
194 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
194 ## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
195 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
195 ## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
196 gist_alias_url =
196 gist_alias_url =
197
197
198 ## white list of API enabled controllers. This allows to add list of
198 ## white list of API enabled controllers. This allows to add list of
199 ## controllers to which access will be enabled by api_key. eg: to enable
199 ## controllers to which access will be enabled by api_key. eg: to enable
200 ## api access to raw_files put `FilesController:raw`, to enable access to patches
200 ## api access to raw_files put `FilesController:raw`, to enable access to patches
201 ## add `ChangesetController:changeset_patch`. This list should be "," separated
201 ## add `ChangesetController:changeset_patch`. This list should be "," separated
202 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
202 ## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
203 ## Recommended settings bellow are commented out:
203 ## Recommended settings bellow are commented out:
204 api_access_controllers_whitelist =
204 api_access_controllers_whitelist =
205 # ChangesetController:changeset_patch,
205 # ChangesetController:changeset_patch,
206 # ChangesetController:changeset_raw,
206 # ChangesetController:changeset_raw,
207 # FilesController:raw,
207 # FilesController:raw,
208 # FilesController:archivefile
208 # FilesController:archivefile
209
209
210 ## alternative_gravatar_url allows you to use your own avatar server application
210 ## alternative_gravatar_url allows you to use your own avatar server application
211 ## the following parts of the URL will be replaced
211 ## the following parts of the URL will be replaced
212 ## {email} user email
212 ## {email} user email
213 ## {md5email} md5 hash of the user email (like at gravatar.com)
213 ## {md5email} md5 hash of the user email (like at gravatar.com)
214 ## {size} size of the image that is expected from the server application
214 ## {size} size of the image that is expected from the server application
215 ## {scheme} http/https from RhodeCode server
215 ## {scheme} http/https from RhodeCode server
216 ## {netloc} network location from RhodeCode server
216 ## {netloc} network location from RhodeCode server
217 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
217 #alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
218 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
218 #alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
219
219
220
220
221 ## container auth options
221 ## container auth options
222 container_auth_enabled = false
222 container_auth_enabled = false
223 proxypass_auth_enabled = false
223 proxypass_auth_enabled = false
224
224
225 ## default encoding used to convert from and to unicode
225 ## default encoding used to convert from and to unicode
226 ## can be also a comma seperated list of encoding in case of mixed encodings
226 ## can be also a comma seperated list of encoding in case of mixed encodings
227 default_encoding = utf8
227 default_encoding = utf8
228
228
229 ## overwrite schema of clone url
229 ## overwrite schema of clone url
230 ## available vars:
230 ## available vars:
231 ## scheme - http/https
231 ## scheme - http/https
232 ## user - current user
232 ## user - current user
233 ## pass - password
233 ## pass - password
234 ## netloc - network location
234 ## netloc - network location
235 ## path - usually repo_name
235 ## path - usually repo_name
236
236
237 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
237 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
238
238
239 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
239 ## issue tracker for RhodeCode (leave blank to disable, absent for default)
240 #bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
240 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
241
241
242 ## issue tracking mapping for commits messages
242 ## issue tracking mapping for commits messages
243 ## comment out issue_pat, issue_server, issue_prefix to enable
243 ## comment out issue_pat, issue_server, issue_prefix to enable
244
244
245 ## pattern to get the issues from commit messages
245 ## pattern to get the issues from commit messages
246 ## default one used here is #<numbers> with a regex passive group for `#`
246 ## default one used here is #<numbers> with a regex passive group for `#`
247 ## {id} will be all groups matched from this pattern
247 ## {id} will be all groups matched from this pattern
248
248
249 issue_pat = (?:\s*#)(\d+)
249 issue_pat = (?:\s*#)(\d+)
250
250
251 ## server url to the issue, each {id} will be replaced with match
251 ## server url to the issue, each {id} will be replaced with match
252 ## fetched from the regex and {repo} is replaced with full repository name
252 ## fetched from the regex and {repo} is replaced with full repository name
253 ## including groups {repo_name} is replaced with just name of repo
253 ## including groups {repo_name} is replaced with just name of repo
254
254
255 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
255 issue_server_link = https://myissueserver.com/{repo}/issue/{id}
256
256
257 ## prefix to add to link to indicate it's an url
257 ## prefix to add to link to indicate it's an url
258 ## #314 will be replaced by <issue_prefix><id>
258 ## #314 will be replaced by <issue_prefix><id>
259
259
260 issue_prefix = #
260 issue_prefix = #
261
261
262 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
262 ## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
263 ## multiple patterns, to other issues server, wiki or others
263 ## multiple patterns, to other issues server, wiki or others
264 ## below an example how to create a wiki pattern
264 ## below an example how to create a wiki pattern
265 # #wiki-some-id -> https://mywiki.com/some-id
265 # #wiki-some-id -> https://mywiki.com/some-id
266
266
267 #issue_pat_wiki = (?:wiki-)(.+)
267 #issue_pat_wiki = (?:wiki-)(.+)
268 #issue_server_link_wiki = https://mywiki.com/{id}
268 #issue_server_link_wiki = https://mywiki.com/{id}
269 #issue_prefix_wiki = WIKI-
269 #issue_prefix_wiki = WIKI-
270
270
271
271
272 ## instance-id prefix
272 ## instance-id prefix
273 ## a prefix key for this instance used for cache invalidation when running
273 ## a prefix key for this instance used for cache invalidation when running
274 ## multiple instances of rhodecode, make sure it's globally unique for
274 ## multiple instances of rhodecode, make sure it's globally unique for
275 ## all running rhodecode instances. Leave empty if you don't use it
275 ## all running rhodecode instances. Leave empty if you don't use it
276 instance_id =
276 instance_id =
277
277
278 ## alternative return HTTP header for failed authentication. Default HTTP
278 ## alternative return HTTP header for failed authentication. Default HTTP
279 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
279 ## response is 401 HTTPUnauthorized. Currently HG clients have troubles with
280 ## handling that. Set this variable to 403 to return HTTPForbidden
280 ## handling that. Set this variable to 403 to return HTTPForbidden
281 auth_ret_code =
281 auth_ret_code =
282
282
283 ## locking return code. When repository is locked return this HTTP code. 2XX
283 ## locking return code. When repository is locked return this HTTP code. 2XX
284 ## codes don't break the transactions while 4XX codes do
284 ## codes don't break the transactions while 4XX codes do
285 lock_ret_code = 423
285 lock_ret_code = 423
286
286
287 ## allows to change the repository location in settings page
287 ## allows to change the repository location in settings page
288 allow_repo_location_change = True
288 allow_repo_location_change = True
289
289
290 ## allows to setup custom hooks in settings page
290 ## allows to setup custom hooks in settings page
291 allow_custom_hooks_settings = True
291 allow_custom_hooks_settings = True
292
292
293
293
294 ####################################
294 ####################################
295 ### CELERY CONFIG ####
295 ### CELERY CONFIG ####
296 ####################################
296 ####################################
297 use_celery = false
297 use_celery = false
298 broker.host = localhost
298 broker.host = localhost
299 broker.vhost = rabbitmqhost
299 broker.vhost = rabbitmqhost
300 broker.port = 5672
300 broker.port = 5672
301 broker.user = rabbitmq
301 broker.user = rabbitmq
302 broker.password = qweqwe
302 broker.password = qweqwe
303
303
304 celery.imports = rhodecode.lib.celerylib.tasks
304 celery.imports = rhodecode.lib.celerylib.tasks
305
305
306 celery.result.backend = amqp
306 celery.result.backend = amqp
307 celery.result.dburi = amqp://
307 celery.result.dburi = amqp://
308 celery.result.serialier = json
308 celery.result.serialier = json
309
309
310 #celery.send.task.error.emails = true
310 #celery.send.task.error.emails = true
311 #celery.amqp.task.result.expires = 18000
311 #celery.amqp.task.result.expires = 18000
312
312
313 celeryd.concurrency = 2
313 celeryd.concurrency = 2
314 #celeryd.log.file = celeryd.log
314 #celeryd.log.file = celeryd.log
315 celeryd.log.level = debug
315 celeryd.log.level = debug
316 celeryd.max.tasks.per.child = 1
316 celeryd.max.tasks.per.child = 1
317
317
318 ## tasks will never be sent to the queue, but executed locally instead.
318 ## tasks will never be sent to the queue, but executed locally instead.
319 celery.always.eager = false
319 celery.always.eager = false
320
320
321 ####################################
321 ####################################
322 ### BEAKER CACHE ####
322 ### BEAKER CACHE ####
323 ####################################
323 ####################################
324 beaker.cache.data_dir=%(here)s/data/cache/data
324 beaker.cache.data_dir=%(here)s/data/cache/data
325 beaker.cache.lock_dir=%(here)s/data/cache/lock
325 beaker.cache.lock_dir=%(here)s/data/cache/lock
326
326
327 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
327 beaker.cache.regions=super_short_term,short_term,long_term,sql_cache_short,sql_cache_med,sql_cache_long
328
328
329 beaker.cache.super_short_term.type=memory
329 beaker.cache.super_short_term.type=memory
330 beaker.cache.super_short_term.expire=10
330 beaker.cache.super_short_term.expire=10
331 beaker.cache.super_short_term.key_length = 256
331 beaker.cache.super_short_term.key_length = 256
332
332
333 beaker.cache.short_term.type=memory
333 beaker.cache.short_term.type=memory
334 beaker.cache.short_term.expire=60
334 beaker.cache.short_term.expire=60
335 beaker.cache.short_term.key_length = 256
335 beaker.cache.short_term.key_length = 256
336
336
337 beaker.cache.long_term.type=memory
337 beaker.cache.long_term.type=memory
338 beaker.cache.long_term.expire=36000
338 beaker.cache.long_term.expire=36000
339 beaker.cache.long_term.key_length = 256
339 beaker.cache.long_term.key_length = 256
340
340
341 beaker.cache.sql_cache_short.type=memory
341 beaker.cache.sql_cache_short.type=memory
342 beaker.cache.sql_cache_short.expire=10
342 beaker.cache.sql_cache_short.expire=10
343 beaker.cache.sql_cache_short.key_length = 256
343 beaker.cache.sql_cache_short.key_length = 256
344
344
345 beaker.cache.sql_cache_med.type=memory
345 beaker.cache.sql_cache_med.type=memory
346 beaker.cache.sql_cache_med.expire=360
346 beaker.cache.sql_cache_med.expire=360
347 beaker.cache.sql_cache_med.key_length = 256
347 beaker.cache.sql_cache_med.key_length = 256
348
348
349 beaker.cache.sql_cache_long.type=file
349 beaker.cache.sql_cache_long.type=file
350 beaker.cache.sql_cache_long.expire=3600
350 beaker.cache.sql_cache_long.expire=3600
351 beaker.cache.sql_cache_long.key_length = 256
351 beaker.cache.sql_cache_long.key_length = 256
352
352
353 ####################################
353 ####################################
354 ### BEAKER SESSION ####
354 ### BEAKER SESSION ####
355 ####################################
355 ####################################
356 ## Type of storage used for the session, current types are
356 ## Type of storage used for the session, current types are
357 ## dbm, file, memcached, database, and memory.
357 ## dbm, file, memcached, database, and memory.
358 ## The storage uses the Container API
358 ## The storage uses the Container API
359 ## that is also used by the cache system.
359 ## that is also used by the cache system.
360
360
361 ## db session ##
361 ## db session ##
362 #beaker.session.type = ext:database
362 #beaker.session.type = ext:database
363 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
363 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
364 #beaker.session.table_name = db_session
364 #beaker.session.table_name = db_session
365
365
366 ## encrypted cookie client side session, good for many instances ##
366 ## encrypted cookie client side session, good for many instances ##
367 #beaker.session.type = cookie
367 #beaker.session.type = cookie
368
368
369 ## file based cookies (default) ##
369 ## file based cookies (default) ##
370 #beaker.session.type = file
370 #beaker.session.type = file
371
371
372 beaker.session.key = rhodecode
372 beaker.session.key = rhodecode
373 beaker.session.secret = ${app_instance_uuid}
373 beaker.session.secret = ${app_instance_uuid}
374
374
375 ## Secure encrypted cookie. Requires AES and AES python libraries
375 ## Secure encrypted cookie. Requires AES and AES python libraries
376 ## you must disable beaker.session.secret to use this
376 ## you must disable beaker.session.secret to use this
377 #beaker.session.encrypt_key = <key_for_encryption>
377 #beaker.session.encrypt_key = <key_for_encryption>
378 #beaker.session.validate_key = <validation_key>
378 #beaker.session.validate_key = <validation_key>
379
379
380 ## sets session as invalid if it haven't been accessed for given amount of time
380 ## sets session as invalid if it haven't been accessed for given amount of time
381 beaker.session.timeout = 2592000
381 beaker.session.timeout = 2592000
382 beaker.session.httponly = true
382 beaker.session.httponly = true
383 #beaker.session.cookie_path = /<your-prefix>
383 #beaker.session.cookie_path = /<your-prefix>
384
384
385 ## uncomment for https secure cookie
385 ## uncomment for https secure cookie
386 beaker.session.secure = false
386 beaker.session.secure = false
387
387
388 ## auto save the session to not to use .save()
388 ## auto save the session to not to use .save()
389 beaker.session.auto = False
389 beaker.session.auto = False
390
390
391 ## default cookie expiration time in seconds `true` expire at browser close ##
391 ## default cookie expiration time in seconds `true` expire at browser close ##
392 #beaker.session.cookie_expires = 3600
392 #beaker.session.cookie_expires = 3600
393
393
394
394
395 ############################
395 ############################
396 ## ERROR HANDLING SYSTEMS ##
396 ## ERROR HANDLING SYSTEMS ##
397 ############################
397 ############################
398
398
399 ####################
399 ####################
400 ### [errormator] ###
400 ### [errormator] ###
401 ####################
401 ####################
402
402
403 ## Errormator is tailored to work with RhodeCode, see
403 ## Errormator is tailored to work with RhodeCode, see
404 ## http://errormator.com for details how to obtain an account
404 ## http://errormator.com for details how to obtain an account
405 ## you must install python package `errormator_client` to make it work
405 ## you must install python package `errormator_client` to make it work
406
406
407 ## errormator enabled
407 ## errormator enabled
408 errormator = false
408 errormator = false
409
409
410 errormator.server_url = https://api.errormator.com
410 errormator.server_url = https://api.errormator.com
411 errormator.api_key = YOUR_API_KEY
411 errormator.api_key = YOUR_API_KEY
412
412
413 ## TWEAK AMOUNT OF INFO SENT HERE
413 ## TWEAK AMOUNT OF INFO SENT HERE
414
414
415 ## enables 404 error logging (default False)
415 ## enables 404 error logging (default False)
416 errormator.report_404 = false
416 errormator.report_404 = false
417
417
418 ## time in seconds after request is considered being slow (default 1)
418 ## time in seconds after request is considered being slow (default 1)
419 errormator.slow_request_time = 1
419 errormator.slow_request_time = 1
420
420
421 ## record slow requests in application
421 ## record slow requests in application
422 ## (needs to be enabled for slow datastore recording and time tracking)
422 ## (needs to be enabled for slow datastore recording and time tracking)
423 errormator.slow_requests = true
423 errormator.slow_requests = true
424
424
425 ## enable hooking to application loggers
425 ## enable hooking to application loggers
426 # errormator.logging = true
426 # errormator.logging = true
427
427
428 ## minimum log level for log capture
428 ## minimum log level for log capture
429 # errormator.logging.level = WARNING
429 # errormator.logging.level = WARNING
430
430
431 ## send logs only from erroneous/slow requests
431 ## send logs only from erroneous/slow requests
432 ## (saves API quota for intensive logging)
432 ## (saves API quota for intensive logging)
433 errormator.logging_on_error = false
433 errormator.logging_on_error = false
434
434
435 ## list of additonal keywords that should be grabbed from environ object
435 ## list of additonal keywords that should be grabbed from environ object
436 ## can be string with comma separated list of words in lowercase
436 ## can be string with comma separated list of words in lowercase
437 ## (by default client will always send following info:
437 ## (by default client will always send following info:
438 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
438 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
439 ## start with HTTP* this list be extended with additional keywords here
439 ## start with HTTP* this list be extended with additional keywords here
440 errormator.environ_keys_whitelist =
440 errormator.environ_keys_whitelist =
441
441
442
442
443 ## list of keywords that should be blanked from request object
443 ## list of keywords that should be blanked from request object
444 ## can be string with comma separated list of words in lowercase
444 ## can be string with comma separated list of words in lowercase
445 ## (by default client will always blank keys that contain following words
445 ## (by default client will always blank keys that contain following words
446 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
446 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
447 ## this list be extended with additional keywords set here
447 ## this list be extended with additional keywords set here
448 errormator.request_keys_blacklist =
448 errormator.request_keys_blacklist =
449
449
450
450
451 ## list of namespaces that should be ignores when gathering log entries
451 ## list of namespaces that should be ignores when gathering log entries
452 ## can be string with comma separated list of namespaces
452 ## can be string with comma separated list of namespaces
453 ## (by default the client ignores own entries: errormator_client.client)
453 ## (by default the client ignores own entries: errormator_client.client)
454 errormator.log_namespace_blacklist =
454 errormator.log_namespace_blacklist =
455
455
456
456
457 ################
457 ################
458 ### [sentry] ###
458 ### [sentry] ###
459 ################
459 ################
460
460
461 ## sentry is a alternative open source error aggregator
461 ## sentry is a alternative open source error aggregator
462 ## you must install python packages `sentry` and `raven` to enable
462 ## you must install python packages `sentry` and `raven` to enable
463
463
464 sentry.dsn = YOUR_DNS
464 sentry.dsn = YOUR_DNS
465 sentry.servers =
465 sentry.servers =
466 sentry.name =
466 sentry.name =
467 sentry.key =
467 sentry.key =
468 sentry.public_key =
468 sentry.public_key =
469 sentry.secret_key =
469 sentry.secret_key =
470 sentry.project =
470 sentry.project =
471 sentry.site =
471 sentry.site =
472 sentry.include_paths =
472 sentry.include_paths =
473 sentry.exclude_paths =
473 sentry.exclude_paths =
474
474
475
475
476 ################################################################################
476 ################################################################################
477 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
477 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
478 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
478 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
479 ## execute malicious code after an exception is raised. ##
479 ## execute malicious code after an exception is raised. ##
480 ################################################################################
480 ################################################################################
481 set debug = false
481 set debug = false
482
482
483 ##################################
483 ##################################
484 ### LOGVIEW CONFIG ###
484 ### LOGVIEW CONFIG ###
485 ##################################
485 ##################################
486 logview.sqlalchemy = #faa
486 logview.sqlalchemy = #faa
487 logview.pylons.templating = #bfb
487 logview.pylons.templating = #bfb
488 logview.pylons.util = #eee
488 logview.pylons.util = #eee
489
489
490 #########################################################
490 #########################################################
491 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
491 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
492 #########################################################
492 #########################################################
493
493
494 # SQLITE [default]
494 # SQLITE [default]
495 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
495 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
496
496
497 # POSTGRESQL
497 # POSTGRESQL
498 # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
498 # sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
499
499
500 # MySQL
500 # MySQL
501 # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
501 # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
502
502
503 # see sqlalchemy docs for others
503 # see sqlalchemy docs for others
504
504
505 sqlalchemy.db1.echo = false
505 sqlalchemy.db1.echo = false
506 sqlalchemy.db1.pool_recycle = 3600
506 sqlalchemy.db1.pool_recycle = 3600
507 sqlalchemy.db1.convert_unicode = true
507 sqlalchemy.db1.convert_unicode = true
508
508
509 ################################
509 ################################
510 ### LOGGING CONFIGURATION ####
510 ### LOGGING CONFIGURATION ####
511 ################################
511 ################################
512 [loggers]
512 [loggers]
513 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
513 keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
514
514
515 [handlers]
515 [handlers]
516 keys = console, console_sql
516 keys = console, console_sql
517
517
518 [formatters]
518 [formatters]
519 keys = generic, color_formatter, color_formatter_sql
519 keys = generic, color_formatter, color_formatter_sql
520
520
521 #############
521 #############
522 ## LOGGERS ##
522 ## LOGGERS ##
523 #############
523 #############
524 [logger_root]
524 [logger_root]
525 level = NOTSET
525 level = NOTSET
526 handlers = console
526 handlers = console
527
527
528 [logger_routes]
528 [logger_routes]
529 level = DEBUG
529 level = DEBUG
530 handlers =
530 handlers =
531 qualname = routes.middleware
531 qualname = routes.middleware
532 ## "level = DEBUG" logs the route matched and routing variables.
532 ## "level = DEBUG" logs the route matched and routing variables.
533 propagate = 1
533 propagate = 1
534
534
535 [logger_beaker]
535 [logger_beaker]
536 level = DEBUG
536 level = DEBUG
537 handlers =
537 handlers =
538 qualname = beaker.container
538 qualname = beaker.container
539 propagate = 1
539 propagate = 1
540
540
541 [logger_templates]
541 [logger_templates]
542 level = INFO
542 level = INFO
543 handlers =
543 handlers =
544 qualname = pylons.templating
544 qualname = pylons.templating
545 propagate = 1
545 propagate = 1
546
546
547 [logger_rhodecode]
547 [logger_rhodecode]
548 level = DEBUG
548 level = DEBUG
549 handlers =
549 handlers =
550 qualname = rhodecode
550 qualname = rhodecode
551 propagate = 1
551 propagate = 1
552
552
553 [logger_sqlalchemy]
553 [logger_sqlalchemy]
554 level = INFO
554 level = INFO
555 handlers = console_sql
555 handlers = console_sql
556 qualname = sqlalchemy.engine
556 qualname = sqlalchemy.engine
557 propagate = 0
557 propagate = 0
558
558
559 [logger_whoosh_indexer]
559 [logger_whoosh_indexer]
560 level = DEBUG
560 level = DEBUG
561 handlers =
561 handlers =
562 qualname = whoosh_indexer
562 qualname = whoosh_indexer
563 propagate = 1
563 propagate = 1
564
564
565 ##############
565 ##############
566 ## HANDLERS ##
566 ## HANDLERS ##
567 ##############
567 ##############
568
568
569 [handler_console]
569 [handler_console]
570 class = StreamHandler
570 class = StreamHandler
571 args = (sys.stderr,)
571 args = (sys.stderr,)
572 level = INFO
572 level = INFO
573 formatter = generic
573 formatter = generic
574
574
575 [handler_console_sql]
575 [handler_console_sql]
576 class = StreamHandler
576 class = StreamHandler
577 args = (sys.stderr,)
577 args = (sys.stderr,)
578 level = WARN
578 level = WARN
579 formatter = generic
579 formatter = generic
580
580
581 ################
581 ################
582 ## FORMATTERS ##
582 ## FORMATTERS ##
583 ################
583 ################
584
584
585 [formatter_generic]
585 [formatter_generic]
586 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
586 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
587 datefmt = %Y-%m-%d %H:%M:%S
587 datefmt = %Y-%m-%d %H:%M:%S
588
588
589 [formatter_color_formatter]
589 [formatter_color_formatter]
590 class=rhodecode.lib.colored_formatter.ColorFormatter
590 class=rhodecode.lib.colored_formatter.ColorFormatter
591 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
591 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
592 datefmt = %Y-%m-%d %H:%M:%S
592 datefmt = %Y-%m-%d %H:%M:%S
593
593
594 [formatter_color_formatter_sql]
594 [formatter_color_formatter_sql]
595 class=rhodecode.lib.colored_formatter.ColorFormatterSql
595 class=rhodecode.lib.colored_formatter.ColorFormatterSql
596 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
596 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
597 datefmt = %Y-%m-%d %H:%M:%S
597 datefmt = %Y-%m-%d %H:%M:%S
@@ -1,840 +1,840 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 # This program is free software: you can redistribute it and/or modify
2 # This program is free software: you can redistribute it and/or modify
3 # it under the terms of the GNU General Public License as published by
3 # it under the terms of the GNU General Public License as published by
4 # the Free Software Foundation, either version 3 of the License, or
4 # the Free Software Foundation, either version 3 of the License, or
5 # (at your option) any later version.
5 # (at your option) any later version.
6 #
6 #
7 # This program is distributed in the hope that it will be useful,
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
10 # GNU General Public License for more details.
11 #
11 #
12 # You should have received a copy of the GNU General Public License
12 # You should have received a copy of the GNU General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 """
14 """
15 Routes configuration
15 Routes configuration
16
16
17 The more specific and detailed routes should be defined first so they
17 The more specific and detailed routes should be defined first so they
18 may take precedent over the more generic routes. For more information
18 may take precedent over the more generic routes. For more information
19 refer to the routes manual at http://routes.groovie.org/docs/
19 refer to the routes manual at http://routes.groovie.org/docs/
20 """
20 """
21
21
22 from __future__ import with_statement
22 from __future__ import with_statement
23 from routes import Mapper
23 from routes import Mapper
24
24
25 # prefix for non repository related links needs to be prefixed with `/`
25 # prefix for non repository related links needs to be prefixed with `/`
26 ADMIN_PREFIX = '/_admin'
26 ADMIN_PREFIX = '/_admin'
27
27
28
28
29 def make_map(config):
29 def make_map(config):
30 """Create, configure and return the routes Mapper"""
30 """Create, configure and return the routes Mapper"""
31 rmap = Mapper(directory=config['pylons.paths']['controllers'],
31 rmap = Mapper(directory=config['pylons.paths']['controllers'],
32 always_scan=config['debug'])
32 always_scan=config['debug'])
33 rmap.minimization = False
33 rmap.minimization = False
34 rmap.explicit = False
34 rmap.explicit = False
35
35
36 from rhodecode.lib.utils import (is_valid_repo, is_valid_repo_group,
36 from rhodecode.lib.utils import (is_valid_repo, is_valid_repo_group,
37 get_repo_by_id)
37 get_repo_by_id)
38
38
39 def check_repo(environ, match_dict):
39 def check_repo(environ, match_dict):
40 """
40 """
41 check for valid repository for proper 404 handling
41 check for valid repository for proper 404 handling
42
42
43 :param environ:
43 :param environ:
44 :param match_dict:
44 :param match_dict:
45 """
45 """
46 repo_name = match_dict.get('repo_name')
46 repo_name = match_dict.get('repo_name')
47
47
48 if match_dict.get('f_path'):
48 if match_dict.get('f_path'):
49 #fix for multiple initial slashes that causes errors
49 #fix for multiple initial slashes that causes errors
50 match_dict['f_path'] = match_dict['f_path'].lstrip('/')
50 match_dict['f_path'] = match_dict['f_path'].lstrip('/')
51
51
52 by_id_match = get_repo_by_id(repo_name)
52 by_id_match = get_repo_by_id(repo_name)
53 if by_id_match:
53 if by_id_match:
54 repo_name = by_id_match
54 repo_name = by_id_match
55 match_dict['repo_name'] = repo_name
55 match_dict['repo_name'] = repo_name
56
56
57 return is_valid_repo(repo_name, config['base_path'])
57 return is_valid_repo(repo_name, config['base_path'])
58
58
59 def check_group(environ, match_dict):
59 def check_group(environ, match_dict):
60 """
60 """
61 check for valid repository group for proper 404 handling
61 check for valid repository group for proper 404 handling
62
62
63 :param environ:
63 :param environ:
64 :param match_dict:
64 :param match_dict:
65 """
65 """
66 repo_group_name = match_dict.get('group_name')
66 repo_group_name = match_dict.get('group_name')
67 return is_valid_repo_group(repo_group_name, config['base_path'])
67 return is_valid_repo_group(repo_group_name, config['base_path'])
68
68
69 def check_group_skip_path(environ, match_dict):
69 def check_group_skip_path(environ, match_dict):
70 """
70 """
71 check for valid repository group for proper 404 handling, but skips
71 check for valid repository group for proper 404 handling, but skips
72 verification of existing path
72 verification of existing path
73
73
74 :param environ:
74 :param environ:
75 :param match_dict:
75 :param match_dict:
76 """
76 """
77 repo_group_name = match_dict.get('group_name')
77 repo_group_name = match_dict.get('group_name')
78 return is_valid_repo_group(repo_group_name, config['base_path'],
78 return is_valid_repo_group(repo_group_name, config['base_path'],
79 skip_path_check=True)
79 skip_path_check=True)
80
80
81 def check_user_group(environ, match_dict):
81 def check_user_group(environ, match_dict):
82 """
82 """
83 check for valid user group for proper 404 handling
83 check for valid user group for proper 404 handling
84
84
85 :param environ:
85 :param environ:
86 :param match_dict:
86 :param match_dict:
87 """
87 """
88 return True
88 return True
89
89
90 def check_int(environ, match_dict):
90 def check_int(environ, match_dict):
91 return match_dict.get('id').isdigit()
91 return match_dict.get('id').isdigit()
92
92
93 # The ErrorController route (handles 404/500 error pages); it should
93 # The ErrorController route (handles 404/500 error pages); it should
94 # likely stay at the top, ensuring it can always be resolved
94 # likely stay at the top, ensuring it can always be resolved
95 rmap.connect('/error/{action}', controller='error')
95 rmap.connect('/error/{action}', controller='error')
96 rmap.connect('/error/{action}/{id}', controller='error')
96 rmap.connect('/error/{action}/{id}', controller='error')
97
97
98 #==========================================================================
98 #==========================================================================
99 # CUSTOM ROUTES HERE
99 # CUSTOM ROUTES HERE
100 #==========================================================================
100 #==========================================================================
101
101
102 #MAIN PAGE
102 #MAIN PAGE
103 rmap.connect('home', '/', controller='home', action='index')
103 rmap.connect('home', '/', controller='home', action='index')
104 rmap.connect('about', '/about', controller='home', action='about')
104 rmap.connect('about', '/about', controller='home', action='about')
105 rmap.connect('repo_switcher_data', '/_repos', controller='home',
105 rmap.connect('repo_switcher_data', '/_repos', controller='home',
106 action='repo_switcher_data')
106 action='repo_switcher_data')
107
107
108 rmap.connect('rst_help',
108 rmap.connect('rst_help',
109 "http://docutils.sourceforge.net/docs/user/rst/quickref.html",
109 "http://docutils.sourceforge.net/docs/user/rst/quickref.html",
110 _static=True)
110 _static=True)
111 rmap.connect('rhodecode_official', "https://rhodecode.com", _static=True)
111 rmap.connect('rhodecode_official', "https://rhodecode.com", _static=True)
112 rmap.connect('rc_issue_tracker', 'https://rhodecode.com/help/', _static=True)
112 rmap.connect('rc_issue_tracker', 'https://bitbucket.org/conservancy/kallithea/issues', _static=True)
113
113
114 #ADMIN REPOSITORY ROUTES
114 #ADMIN REPOSITORY ROUTES
115 with rmap.submapper(path_prefix=ADMIN_PREFIX,
115 with rmap.submapper(path_prefix=ADMIN_PREFIX,
116 controller='admin/repos') as m:
116 controller='admin/repos') as m:
117 m.connect("repos", "/repos",
117 m.connect("repos", "/repos",
118 action="create", conditions=dict(method=["POST"]))
118 action="create", conditions=dict(method=["POST"]))
119 m.connect("repos", "/repos",
119 m.connect("repos", "/repos",
120 action="index", conditions=dict(method=["GET"]))
120 action="index", conditions=dict(method=["GET"]))
121 m.connect("new_repo", "/create_repository",
121 m.connect("new_repo", "/create_repository",
122 action="create_repository", conditions=dict(method=["GET"]))
122 action="create_repository", conditions=dict(method=["GET"]))
123 m.connect("/repos/{repo_name:.*?}",
123 m.connect("/repos/{repo_name:.*?}",
124 action="update", conditions=dict(method=["PUT"],
124 action="update", conditions=dict(method=["PUT"],
125 function=check_repo))
125 function=check_repo))
126 m.connect("delete_repo", "/repos/{repo_name:.*?}",
126 m.connect("delete_repo", "/repos/{repo_name:.*?}",
127 action="delete", conditions=dict(method=["DELETE"],
127 action="delete", conditions=dict(method=["DELETE"],
128 ))
128 ))
129 m.connect("repo", "/repos/{repo_name:.*?}",
129 m.connect("repo", "/repos/{repo_name:.*?}",
130 action="show", conditions=dict(method=["GET"],
130 action="show", conditions=dict(method=["GET"],
131 function=check_repo))
131 function=check_repo))
132
132
133 #ADMIN REPOSITORY GROUPS ROUTES
133 #ADMIN REPOSITORY GROUPS ROUTES
134 with rmap.submapper(path_prefix=ADMIN_PREFIX,
134 with rmap.submapper(path_prefix=ADMIN_PREFIX,
135 controller='admin/repo_groups') as m:
135 controller='admin/repo_groups') as m:
136 m.connect("repos_groups", "/repo_groups",
136 m.connect("repos_groups", "/repo_groups",
137 action="create", conditions=dict(method=["POST"]))
137 action="create", conditions=dict(method=["POST"]))
138 m.connect("repos_groups", "/repo_groups",
138 m.connect("repos_groups", "/repo_groups",
139 action="index", conditions=dict(method=["GET"]))
139 action="index", conditions=dict(method=["GET"]))
140 m.connect("new_repos_group", "/repo_groups/new",
140 m.connect("new_repos_group", "/repo_groups/new",
141 action="new", conditions=dict(method=["GET"]))
141 action="new", conditions=dict(method=["GET"]))
142 m.connect("update_repos_group", "/repo_groups/{group_name:.*?}",
142 m.connect("update_repos_group", "/repo_groups/{group_name:.*?}",
143 action="update", conditions=dict(method=["PUT"],
143 action="update", conditions=dict(method=["PUT"],
144 function=check_group))
144 function=check_group))
145
145
146 m.connect("repos_group", "/repo_groups/{group_name:.*?}",
146 m.connect("repos_group", "/repo_groups/{group_name:.*?}",
147 action="show", conditions=dict(method=["GET"],
147 action="show", conditions=dict(method=["GET"],
148 function=check_group))
148 function=check_group))
149
149
150 #EXTRAS REPO GROUP ROUTES
150 #EXTRAS REPO GROUP ROUTES
151 m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
151 m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
152 action="edit",
152 action="edit",
153 conditions=dict(method=["GET"], function=check_group))
153 conditions=dict(method=["GET"], function=check_group))
154 m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
154 m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
155 action="edit",
155 action="edit",
156 conditions=dict(method=["PUT"], function=check_group))
156 conditions=dict(method=["PUT"], function=check_group))
157
157
158 m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
158 m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
159 action="edit_repo_group_advanced",
159 action="edit_repo_group_advanced",
160 conditions=dict(method=["GET"], function=check_group))
160 conditions=dict(method=["GET"], function=check_group))
161 m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
161 m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
162 action="edit_repo_group_advanced",
162 action="edit_repo_group_advanced",
163 conditions=dict(method=["PUT"], function=check_group))
163 conditions=dict(method=["PUT"], function=check_group))
164
164
165 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
165 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
166 action="edit_repo_group_perms",
166 action="edit_repo_group_perms",
167 conditions=dict(method=["GET"], function=check_group))
167 conditions=dict(method=["GET"], function=check_group))
168 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
168 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
169 action="update_perms",
169 action="update_perms",
170 conditions=dict(method=["PUT"], function=check_group))
170 conditions=dict(method=["PUT"], function=check_group))
171 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
171 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
172 action="delete_perms",
172 action="delete_perms",
173 conditions=dict(method=["DELETE"], function=check_group))
173 conditions=dict(method=["DELETE"], function=check_group))
174
174
175 m.connect("delete_repos_group", "/repo_groups/{group_name:.*?}",
175 m.connect("delete_repos_group", "/repo_groups/{group_name:.*?}",
176 action="delete", conditions=dict(method=["DELETE"],
176 action="delete", conditions=dict(method=["DELETE"],
177 function=check_group_skip_path))
177 function=check_group_skip_path))
178
178
179
179
180 #ADMIN USER ROUTES
180 #ADMIN USER ROUTES
181 with rmap.submapper(path_prefix=ADMIN_PREFIX,
181 with rmap.submapper(path_prefix=ADMIN_PREFIX,
182 controller='admin/users') as m:
182 controller='admin/users') as m:
183 m.connect("users", "/users",
183 m.connect("users", "/users",
184 action="create", conditions=dict(method=["POST"]))
184 action="create", conditions=dict(method=["POST"]))
185 m.connect("users", "/users",
185 m.connect("users", "/users",
186 action="index", conditions=dict(method=["GET"]))
186 action="index", conditions=dict(method=["GET"]))
187 m.connect("formatted_users", "/users.{format}",
187 m.connect("formatted_users", "/users.{format}",
188 action="index", conditions=dict(method=["GET"]))
188 action="index", conditions=dict(method=["GET"]))
189 m.connect("new_user", "/users/new",
189 m.connect("new_user", "/users/new",
190 action="new", conditions=dict(method=["GET"]))
190 action="new", conditions=dict(method=["GET"]))
191 m.connect("update_user", "/users/{id}",
191 m.connect("update_user", "/users/{id}",
192 action="update", conditions=dict(method=["PUT"]))
192 action="update", conditions=dict(method=["PUT"]))
193 m.connect("delete_user", "/users/{id}",
193 m.connect("delete_user", "/users/{id}",
194 action="delete", conditions=dict(method=["DELETE"]))
194 action="delete", conditions=dict(method=["DELETE"]))
195 m.connect("edit_user", "/users/{id}/edit",
195 m.connect("edit_user", "/users/{id}/edit",
196 action="edit", conditions=dict(method=["GET"]))
196 action="edit", conditions=dict(method=["GET"]))
197 m.connect("user", "/users/{id}",
197 m.connect("user", "/users/{id}",
198 action="show", conditions=dict(method=["GET"]))
198 action="show", conditions=dict(method=["GET"]))
199
199
200 #EXTRAS USER ROUTES
200 #EXTRAS USER ROUTES
201 m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
201 m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
202 action="edit_advanced", conditions=dict(method=["GET"]))
202 action="edit_advanced", conditions=dict(method=["GET"]))
203 m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
203 m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
204 action="update_advanced", conditions=dict(method=["PUT"]))
204 action="update_advanced", conditions=dict(method=["PUT"]))
205
205
206 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
206 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
207 action="edit_api_keys", conditions=dict(method=["GET"]))
207 action="edit_api_keys", conditions=dict(method=["GET"]))
208 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
208 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
209 action="add_api_key", conditions=dict(method=["PUT"]))
209 action="add_api_key", conditions=dict(method=["PUT"]))
210 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
210 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
211 action="delete_api_key", conditions=dict(method=["DELETE"]))
211 action="delete_api_key", conditions=dict(method=["DELETE"]))
212
212
213 m.connect("edit_user_perms", "/users/{id}/edit/permissions",
213 m.connect("edit_user_perms", "/users/{id}/edit/permissions",
214 action="edit_perms", conditions=dict(method=["GET"]))
214 action="edit_perms", conditions=dict(method=["GET"]))
215 m.connect("edit_user_perms", "/users/{id}/edit/permissions",
215 m.connect("edit_user_perms", "/users/{id}/edit/permissions",
216 action="update_perms", conditions=dict(method=["PUT"]))
216 action="update_perms", conditions=dict(method=["PUT"]))
217
217
218 m.connect("edit_user_emails", "/users/{id}/edit/emails",
218 m.connect("edit_user_emails", "/users/{id}/edit/emails",
219 action="edit_emails", conditions=dict(method=["GET"]))
219 action="edit_emails", conditions=dict(method=["GET"]))
220 m.connect("edit_user_emails", "/users/{id}/edit/emails",
220 m.connect("edit_user_emails", "/users/{id}/edit/emails",
221 action="add_email", conditions=dict(method=["PUT"]))
221 action="add_email", conditions=dict(method=["PUT"]))
222 m.connect("edit_user_emails", "/users/{id}/edit/emails",
222 m.connect("edit_user_emails", "/users/{id}/edit/emails",
223 action="delete_email", conditions=dict(method=["DELETE"]))
223 action="delete_email", conditions=dict(method=["DELETE"]))
224
224
225 m.connect("edit_user_ips", "/users/{id}/edit/ips",
225 m.connect("edit_user_ips", "/users/{id}/edit/ips",
226 action="edit_ips", conditions=dict(method=["GET"]))
226 action="edit_ips", conditions=dict(method=["GET"]))
227 m.connect("edit_user_ips", "/users/{id}/edit/ips",
227 m.connect("edit_user_ips", "/users/{id}/edit/ips",
228 action="add_ip", conditions=dict(method=["PUT"]))
228 action="add_ip", conditions=dict(method=["PUT"]))
229 m.connect("edit_user_ips", "/users/{id}/edit/ips",
229 m.connect("edit_user_ips", "/users/{id}/edit/ips",
230 action="delete_ip", conditions=dict(method=["DELETE"]))
230 action="delete_ip", conditions=dict(method=["DELETE"]))
231
231
232 #ADMIN USER GROUPS REST ROUTES
232 #ADMIN USER GROUPS REST ROUTES
233 with rmap.submapper(path_prefix=ADMIN_PREFIX,
233 with rmap.submapper(path_prefix=ADMIN_PREFIX,
234 controller='admin/user_groups') as m:
234 controller='admin/user_groups') as m:
235 m.connect("users_groups", "/user_groups",
235 m.connect("users_groups", "/user_groups",
236 action="create", conditions=dict(method=["POST"]))
236 action="create", conditions=dict(method=["POST"]))
237 m.connect("users_groups", "/user_groups",
237 m.connect("users_groups", "/user_groups",
238 action="index", conditions=dict(method=["GET"]))
238 action="index", conditions=dict(method=["GET"]))
239 m.connect("new_users_group", "/user_groups/new",
239 m.connect("new_users_group", "/user_groups/new",
240 action="new", conditions=dict(method=["GET"]))
240 action="new", conditions=dict(method=["GET"]))
241 m.connect("update_users_group", "/user_groups/{id}",
241 m.connect("update_users_group", "/user_groups/{id}",
242 action="update", conditions=dict(method=["PUT"]))
242 action="update", conditions=dict(method=["PUT"]))
243 m.connect("delete_users_group", "/user_groups/{id}",
243 m.connect("delete_users_group", "/user_groups/{id}",
244 action="delete", conditions=dict(method=["DELETE"]))
244 action="delete", conditions=dict(method=["DELETE"]))
245 m.connect("edit_users_group", "/user_groups/{id}/edit",
245 m.connect("edit_users_group", "/user_groups/{id}/edit",
246 action="edit", conditions=dict(method=["GET"]),
246 action="edit", conditions=dict(method=["GET"]),
247 function=check_user_group)
247 function=check_user_group)
248 m.connect("users_group", "/user_groups/{id}",
248 m.connect("users_group", "/user_groups/{id}",
249 action="show", conditions=dict(method=["GET"]))
249 action="show", conditions=dict(method=["GET"]))
250
250
251 #EXTRAS USER GROUP ROUTES
251 #EXTRAS USER GROUP ROUTES
252 m.connect("edit_user_group_default_perms", "/user_groups/{id}/edit/default_perms",
252 m.connect("edit_user_group_default_perms", "/user_groups/{id}/edit/default_perms",
253 action="edit_default_perms", conditions=dict(method=["GET"]))
253 action="edit_default_perms", conditions=dict(method=["GET"]))
254 m.connect("edit_user_group_default_perms", "/user_groups/{id}/edit/default_perms",
254 m.connect("edit_user_group_default_perms", "/user_groups/{id}/edit/default_perms",
255 action="update_default_perms", conditions=dict(method=["PUT"]))
255 action="update_default_perms", conditions=dict(method=["PUT"]))
256
256
257
257
258 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
258 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
259 action="edit_perms", conditions=dict(method=["GET"]))
259 action="edit_perms", conditions=dict(method=["GET"]))
260 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
260 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
261 action="update_perms", conditions=dict(method=["PUT"]))
261 action="update_perms", conditions=dict(method=["PUT"]))
262 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
262 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
263 action="delete_perms", conditions=dict(method=["DELETE"]))
263 action="delete_perms", conditions=dict(method=["DELETE"]))
264
264
265 m.connect("edit_user_group_advanced", "/user_groups/{id}/edit/advanced",
265 m.connect("edit_user_group_advanced", "/user_groups/{id}/edit/advanced",
266 action="edit_advanced", conditions=dict(method=["GET"]))
266 action="edit_advanced", conditions=dict(method=["GET"]))
267
267
268 m.connect("edit_user_group_members", "/user_groups/{id}/edit/members",
268 m.connect("edit_user_group_members", "/user_groups/{id}/edit/members",
269 action="edit_members", conditions=dict(method=["GET"]))
269 action="edit_members", conditions=dict(method=["GET"]))
270
270
271
271
272
272
273 #ADMIN PERMISSIONS ROUTES
273 #ADMIN PERMISSIONS ROUTES
274 with rmap.submapper(path_prefix=ADMIN_PREFIX,
274 with rmap.submapper(path_prefix=ADMIN_PREFIX,
275 controller='admin/permissions') as m:
275 controller='admin/permissions') as m:
276 m.connect("admin_permissions", "/permissions",
276 m.connect("admin_permissions", "/permissions",
277 action="permission_globals", conditions=dict(method=["POST"]))
277 action="permission_globals", conditions=dict(method=["POST"]))
278 m.connect("admin_permissions", "/permissions",
278 m.connect("admin_permissions", "/permissions",
279 action="permission_globals", conditions=dict(method=["GET"]))
279 action="permission_globals", conditions=dict(method=["GET"]))
280
280
281 m.connect("admin_permissions_ips", "/permissions/ips",
281 m.connect("admin_permissions_ips", "/permissions/ips",
282 action="permission_ips", conditions=dict(method=["POST"]))
282 action="permission_ips", conditions=dict(method=["POST"]))
283 m.connect("admin_permissions_ips", "/permissions/ips",
283 m.connect("admin_permissions_ips", "/permissions/ips",
284 action="permission_ips", conditions=dict(method=["GET"]))
284 action="permission_ips", conditions=dict(method=["GET"]))
285
285
286 m.connect("admin_permissions_perms", "/permissions/perms",
286 m.connect("admin_permissions_perms", "/permissions/perms",
287 action="permission_perms", conditions=dict(method=["POST"]))
287 action="permission_perms", conditions=dict(method=["POST"]))
288 m.connect("admin_permissions_perms", "/permissions/perms",
288 m.connect("admin_permissions_perms", "/permissions/perms",
289 action="permission_perms", conditions=dict(method=["GET"]))
289 action="permission_perms", conditions=dict(method=["GET"]))
290
290
291
291
292 #ADMIN DEFAULTS REST ROUTES
292 #ADMIN DEFAULTS REST ROUTES
293 rmap.resource('default', 'defaults',
293 rmap.resource('default', 'defaults',
294 controller='admin/defaults', path_prefix=ADMIN_PREFIX)
294 controller='admin/defaults', path_prefix=ADMIN_PREFIX)
295
295
296 #ADMIN AUTH SETTINGS
296 #ADMIN AUTH SETTINGS
297 rmap.connect('auth_settings', '%s/auth' % ADMIN_PREFIX,
297 rmap.connect('auth_settings', '%s/auth' % ADMIN_PREFIX,
298 controller='admin/auth_settings', action='auth_settings',
298 controller='admin/auth_settings', action='auth_settings',
299 conditions=dict(method=["POST"]))
299 conditions=dict(method=["POST"]))
300 rmap.connect('auth_home', '%s/auth' % ADMIN_PREFIX,
300 rmap.connect('auth_home', '%s/auth' % ADMIN_PREFIX,
301 controller='admin/auth_settings')
301 controller='admin/auth_settings')
302
302
303 #ADMIN SETTINGS ROUTES
303 #ADMIN SETTINGS ROUTES
304 with rmap.submapper(path_prefix=ADMIN_PREFIX,
304 with rmap.submapper(path_prefix=ADMIN_PREFIX,
305 controller='admin/settings') as m:
305 controller='admin/settings') as m:
306 m.connect("admin_settings", "/settings",
306 m.connect("admin_settings", "/settings",
307 action="settings_vcs", conditions=dict(method=["POST"]))
307 action="settings_vcs", conditions=dict(method=["POST"]))
308 m.connect("admin_settings", "/settings",
308 m.connect("admin_settings", "/settings",
309 action="settings_vcs", conditions=dict(method=["GET"]))
309 action="settings_vcs", conditions=dict(method=["GET"]))
310
310
311 m.connect("admin_settings_mapping", "/settings/mapping",
311 m.connect("admin_settings_mapping", "/settings/mapping",
312 action="settings_mapping", conditions=dict(method=["POST"]))
312 action="settings_mapping", conditions=dict(method=["POST"]))
313 m.connect("admin_settings_mapping", "/settings/mapping",
313 m.connect("admin_settings_mapping", "/settings/mapping",
314 action="settings_mapping", conditions=dict(method=["GET"]))
314 action="settings_mapping", conditions=dict(method=["GET"]))
315
315
316 m.connect("admin_settings_global", "/settings/global",
316 m.connect("admin_settings_global", "/settings/global",
317 action="settings_global", conditions=dict(method=["POST"]))
317 action="settings_global", conditions=dict(method=["POST"]))
318 m.connect("admin_settings_global", "/settings/global",
318 m.connect("admin_settings_global", "/settings/global",
319 action="settings_global", conditions=dict(method=["GET"]))
319 action="settings_global", conditions=dict(method=["GET"]))
320
320
321 m.connect("admin_settings_visual", "/settings/visual",
321 m.connect("admin_settings_visual", "/settings/visual",
322 action="settings_visual", conditions=dict(method=["POST"]))
322 action="settings_visual", conditions=dict(method=["POST"]))
323 m.connect("admin_settings_visual", "/settings/visual",
323 m.connect("admin_settings_visual", "/settings/visual",
324 action="settings_visual", conditions=dict(method=["GET"]))
324 action="settings_visual", conditions=dict(method=["GET"]))
325
325
326 m.connect("admin_settings_email", "/settings/email",
326 m.connect("admin_settings_email", "/settings/email",
327 action="settings_email", conditions=dict(method=["POST"]))
327 action="settings_email", conditions=dict(method=["POST"]))
328 m.connect("admin_settings_email", "/settings/email",
328 m.connect("admin_settings_email", "/settings/email",
329 action="settings_email", conditions=dict(method=["GET"]))
329 action="settings_email", conditions=dict(method=["GET"]))
330
330
331 m.connect("admin_settings_hooks", "/settings/hooks",
331 m.connect("admin_settings_hooks", "/settings/hooks",
332 action="settings_hooks", conditions=dict(method=["POST"]))
332 action="settings_hooks", conditions=dict(method=["POST"]))
333 m.connect("admin_settings_hooks", "/settings/hooks",
333 m.connect("admin_settings_hooks", "/settings/hooks",
334 action="settings_hooks", conditions=dict(method=["DELETE"]))
334 action="settings_hooks", conditions=dict(method=["DELETE"]))
335 m.connect("admin_settings_hooks", "/settings/hooks",
335 m.connect("admin_settings_hooks", "/settings/hooks",
336 action="settings_hooks", conditions=dict(method=["GET"]))
336 action="settings_hooks", conditions=dict(method=["GET"]))
337
337
338 m.connect("admin_settings_search", "/settings/search",
338 m.connect("admin_settings_search", "/settings/search",
339 action="settings_search", conditions=dict(method=["POST"]))
339 action="settings_search", conditions=dict(method=["POST"]))
340 m.connect("admin_settings_search", "/settings/search",
340 m.connect("admin_settings_search", "/settings/search",
341 action="settings_search", conditions=dict(method=["GET"]))
341 action="settings_search", conditions=dict(method=["GET"]))
342
342
343 m.connect("admin_settings_system", "/settings/system",
343 m.connect("admin_settings_system", "/settings/system",
344 action="settings_system", conditions=dict(method=["POST"]))
344 action="settings_system", conditions=dict(method=["POST"]))
345 m.connect("admin_settings_system", "/settings/system",
345 m.connect("admin_settings_system", "/settings/system",
346 action="settings_system", conditions=dict(method=["GET"]))
346 action="settings_system", conditions=dict(method=["GET"]))
347 m.connect("admin_settings_system_update", "/settings/system/updates",
347 m.connect("admin_settings_system_update", "/settings/system/updates",
348 action="settings_system_update", conditions=dict(method=["GET"]))
348 action="settings_system_update", conditions=dict(method=["GET"]))
349
349
350 #ADMIN MY ACCOUNT
350 #ADMIN MY ACCOUNT
351 with rmap.submapper(path_prefix=ADMIN_PREFIX,
351 with rmap.submapper(path_prefix=ADMIN_PREFIX,
352 controller='admin/my_account') as m:
352 controller='admin/my_account') as m:
353
353
354 m.connect("my_account", "/my_account",
354 m.connect("my_account", "/my_account",
355 action="my_account", conditions=dict(method=["GET"]))
355 action="my_account", conditions=dict(method=["GET"]))
356 m.connect("my_account", "/my_account",
356 m.connect("my_account", "/my_account",
357 action="my_account", conditions=dict(method=["POST"]))
357 action="my_account", conditions=dict(method=["POST"]))
358
358
359 m.connect("my_account_password", "/my_account/password",
359 m.connect("my_account_password", "/my_account/password",
360 action="my_account_password", conditions=dict(method=["GET"]))
360 action="my_account_password", conditions=dict(method=["GET"]))
361 m.connect("my_account_password", "/my_account/password",
361 m.connect("my_account_password", "/my_account/password",
362 action="my_account_password", conditions=dict(method=["POST"]))
362 action="my_account_password", conditions=dict(method=["POST"]))
363
363
364 m.connect("my_account_repos", "/my_account/repos",
364 m.connect("my_account_repos", "/my_account/repos",
365 action="my_account_repos", conditions=dict(method=["GET"]))
365 action="my_account_repos", conditions=dict(method=["GET"]))
366
366
367 m.connect("my_account_watched", "/my_account/watched",
367 m.connect("my_account_watched", "/my_account/watched",
368 action="my_account_watched", conditions=dict(method=["GET"]))
368 action="my_account_watched", conditions=dict(method=["GET"]))
369
369
370 m.connect("my_account_pullrequests", "/my_account/pull_requests",
370 m.connect("my_account_pullrequests", "/my_account/pull_requests",
371 action="my_account_pullrequests", conditions=dict(method=["GET"]))
371 action="my_account_pullrequests", conditions=dict(method=["GET"]))
372
372
373 m.connect("my_account_perms", "/my_account/perms",
373 m.connect("my_account_perms", "/my_account/perms",
374 action="my_account_perms", conditions=dict(method=["GET"]))
374 action="my_account_perms", conditions=dict(method=["GET"]))
375
375
376 m.connect("my_account_emails", "/my_account/emails",
376 m.connect("my_account_emails", "/my_account/emails",
377 action="my_account_emails", conditions=dict(method=["GET"]))
377 action="my_account_emails", conditions=dict(method=["GET"]))
378 m.connect("my_account_emails", "/my_account/emails",
378 m.connect("my_account_emails", "/my_account/emails",
379 action="my_account_emails_add", conditions=dict(method=["POST"]))
379 action="my_account_emails_add", conditions=dict(method=["POST"]))
380 m.connect("my_account_emails", "/my_account/emails",
380 m.connect("my_account_emails", "/my_account/emails",
381 action="my_account_emails_delete", conditions=dict(method=["DELETE"]))
381 action="my_account_emails_delete", conditions=dict(method=["DELETE"]))
382
382
383 m.connect("my_account_api_keys", "/my_account/api_keys",
383 m.connect("my_account_api_keys", "/my_account/api_keys",
384 action="my_account_api_keys", conditions=dict(method=["GET"]))
384 action="my_account_api_keys", conditions=dict(method=["GET"]))
385 m.connect("my_account_api_keys", "/my_account/api_keys",
385 m.connect("my_account_api_keys", "/my_account/api_keys",
386 action="my_account_api_keys_add", conditions=dict(method=["POST"]))
386 action="my_account_api_keys_add", conditions=dict(method=["POST"]))
387 m.connect("my_account_api_keys", "/my_account/api_keys",
387 m.connect("my_account_api_keys", "/my_account/api_keys",
388 action="my_account_api_keys_delete", conditions=dict(method=["DELETE"]))
388 action="my_account_api_keys_delete", conditions=dict(method=["DELETE"]))
389
389
390 #NOTIFICATION REST ROUTES
390 #NOTIFICATION REST ROUTES
391 with rmap.submapper(path_prefix=ADMIN_PREFIX,
391 with rmap.submapper(path_prefix=ADMIN_PREFIX,
392 controller='admin/notifications') as m:
392 controller='admin/notifications') as m:
393 m.connect("notifications", "/notifications",
393 m.connect("notifications", "/notifications",
394 action="create", conditions=dict(method=["POST"]))
394 action="create", conditions=dict(method=["POST"]))
395 m.connect("notifications", "/notifications",
395 m.connect("notifications", "/notifications",
396 action="index", conditions=dict(method=["GET"]))
396 action="index", conditions=dict(method=["GET"]))
397 m.connect("notifications_mark_all_read", "/notifications/mark_all_read",
397 m.connect("notifications_mark_all_read", "/notifications/mark_all_read",
398 action="mark_all_read", conditions=dict(method=["GET"]))
398 action="mark_all_read", conditions=dict(method=["GET"]))
399 m.connect("formatted_notifications", "/notifications.{format}",
399 m.connect("formatted_notifications", "/notifications.{format}",
400 action="index", conditions=dict(method=["GET"]))
400 action="index", conditions=dict(method=["GET"]))
401 m.connect("new_notification", "/notifications/new",
401 m.connect("new_notification", "/notifications/new",
402 action="new", conditions=dict(method=["GET"]))
402 action="new", conditions=dict(method=["GET"]))
403 m.connect("formatted_new_notification", "/notifications/new.{format}",
403 m.connect("formatted_new_notification", "/notifications/new.{format}",
404 action="new", conditions=dict(method=["GET"]))
404 action="new", conditions=dict(method=["GET"]))
405 m.connect("/notifications/{notification_id}",
405 m.connect("/notifications/{notification_id}",
406 action="update", conditions=dict(method=["PUT"]))
406 action="update", conditions=dict(method=["PUT"]))
407 m.connect("/notifications/{notification_id}",
407 m.connect("/notifications/{notification_id}",
408 action="delete", conditions=dict(method=["DELETE"]))
408 action="delete", conditions=dict(method=["DELETE"]))
409 m.connect("edit_notification", "/notifications/{notification_id}/edit",
409 m.connect("edit_notification", "/notifications/{notification_id}/edit",
410 action="edit", conditions=dict(method=["GET"]))
410 action="edit", conditions=dict(method=["GET"]))
411 m.connect("formatted_edit_notification",
411 m.connect("formatted_edit_notification",
412 "/notifications/{notification_id}.{format}/edit",
412 "/notifications/{notification_id}.{format}/edit",
413 action="edit", conditions=dict(method=["GET"]))
413 action="edit", conditions=dict(method=["GET"]))
414 m.connect("notification", "/notifications/{notification_id}",
414 m.connect("notification", "/notifications/{notification_id}",
415 action="show", conditions=dict(method=["GET"]))
415 action="show", conditions=dict(method=["GET"]))
416 m.connect("formatted_notification", "/notifications/{notification_id}.{format}",
416 m.connect("formatted_notification", "/notifications/{notification_id}.{format}",
417 action="show", conditions=dict(method=["GET"]))
417 action="show", conditions=dict(method=["GET"]))
418
418
419 #ADMIN GIST
419 #ADMIN GIST
420 with rmap.submapper(path_prefix=ADMIN_PREFIX,
420 with rmap.submapper(path_prefix=ADMIN_PREFIX,
421 controller='admin/gists') as m:
421 controller='admin/gists') as m:
422 m.connect("gists", "/gists",
422 m.connect("gists", "/gists",
423 action="create", conditions=dict(method=["POST"]))
423 action="create", conditions=dict(method=["POST"]))
424 m.connect("gists", "/gists",
424 m.connect("gists", "/gists",
425 action="index", conditions=dict(method=["GET"]))
425 action="index", conditions=dict(method=["GET"]))
426 m.connect("new_gist", "/gists/new",
426 m.connect("new_gist", "/gists/new",
427 action="new", conditions=dict(method=["GET"]))
427 action="new", conditions=dict(method=["GET"]))
428
428
429
429
430 m.connect("/gists/{gist_id}",
430 m.connect("/gists/{gist_id}",
431 action="update", conditions=dict(method=["PUT"]))
431 action="update", conditions=dict(method=["PUT"]))
432 m.connect("/gists/{gist_id}",
432 m.connect("/gists/{gist_id}",
433 action="delete", conditions=dict(method=["DELETE"]))
433 action="delete", conditions=dict(method=["DELETE"]))
434 m.connect("edit_gist", "/gists/{gist_id}/edit",
434 m.connect("edit_gist", "/gists/{gist_id}/edit",
435 action="edit", conditions=dict(method=["GET", "POST"]))
435 action="edit", conditions=dict(method=["GET", "POST"]))
436 m.connect("edit_gist_check_revision", "/gists/{gist_id}/edit/check_revision",
436 m.connect("edit_gist_check_revision", "/gists/{gist_id}/edit/check_revision",
437 action="check_revision", conditions=dict(method=["POST"]))
437 action="check_revision", conditions=dict(method=["POST"]))
438
438
439
439
440 m.connect("gist", "/gists/{gist_id}",
440 m.connect("gist", "/gists/{gist_id}",
441 action="show", conditions=dict(method=["GET"]))
441 action="show", conditions=dict(method=["GET"]))
442 m.connect("gist_rev", "/gists/{gist_id}/{revision}",
442 m.connect("gist_rev", "/gists/{gist_id}/{revision}",
443 revision="tip",
443 revision="tip",
444 action="show", conditions=dict(method=["GET"]))
444 action="show", conditions=dict(method=["GET"]))
445 m.connect("formatted_gist", "/gists/{gist_id}/{revision}/{format}",
445 m.connect("formatted_gist", "/gists/{gist_id}/{revision}/{format}",
446 revision="tip",
446 revision="tip",
447 action="show", conditions=dict(method=["GET"]))
447 action="show", conditions=dict(method=["GET"]))
448 m.connect("formatted_gist_file", "/gists/{gist_id}/{revision}/{format}/{f_path:.*}",
448 m.connect("formatted_gist_file", "/gists/{gist_id}/{revision}/{format}/{f_path:.*}",
449 revision='tip',
449 revision='tip',
450 action="show", conditions=dict(method=["GET"]))
450 action="show", conditions=dict(method=["GET"]))
451
451
452 #ADMIN MAIN PAGES
452 #ADMIN MAIN PAGES
453 with rmap.submapper(path_prefix=ADMIN_PREFIX,
453 with rmap.submapper(path_prefix=ADMIN_PREFIX,
454 controller='admin/admin') as m:
454 controller='admin/admin') as m:
455 m.connect('admin_home', '', action='index')
455 m.connect('admin_home', '', action='index')
456 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
456 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
457 action='add_repo')
457 action='add_repo')
458 #==========================================================================
458 #==========================================================================
459 # API V2
459 # API V2
460 #==========================================================================
460 #==========================================================================
461 with rmap.submapper(path_prefix=ADMIN_PREFIX,
461 with rmap.submapper(path_prefix=ADMIN_PREFIX,
462 controller='api/api') as m:
462 controller='api/api') as m:
463 m.connect('api', '/api')
463 m.connect('api', '/api')
464
464
465 #USER JOURNAL
465 #USER JOURNAL
466 rmap.connect('journal', '%s/journal' % ADMIN_PREFIX,
466 rmap.connect('journal', '%s/journal' % ADMIN_PREFIX,
467 controller='journal', action='index')
467 controller='journal', action='index')
468 rmap.connect('journal_rss', '%s/journal/rss' % ADMIN_PREFIX,
468 rmap.connect('journal_rss', '%s/journal/rss' % ADMIN_PREFIX,
469 controller='journal', action='journal_rss')
469 controller='journal', action='journal_rss')
470 rmap.connect('journal_atom', '%s/journal/atom' % ADMIN_PREFIX,
470 rmap.connect('journal_atom', '%s/journal/atom' % ADMIN_PREFIX,
471 controller='journal', action='journal_atom')
471 controller='journal', action='journal_atom')
472
472
473 rmap.connect('public_journal', '%s/public_journal' % ADMIN_PREFIX,
473 rmap.connect('public_journal', '%s/public_journal' % ADMIN_PREFIX,
474 controller='journal', action="public_journal")
474 controller='journal', action="public_journal")
475
475
476 rmap.connect('public_journal_rss', '%s/public_journal/rss' % ADMIN_PREFIX,
476 rmap.connect('public_journal_rss', '%s/public_journal/rss' % ADMIN_PREFIX,
477 controller='journal', action="public_journal_rss")
477 controller='journal', action="public_journal_rss")
478
478
479 rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % ADMIN_PREFIX,
479 rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % ADMIN_PREFIX,
480 controller='journal', action="public_journal_rss")
480 controller='journal', action="public_journal_rss")
481
481
482 rmap.connect('public_journal_atom',
482 rmap.connect('public_journal_atom',
483 '%s/public_journal/atom' % ADMIN_PREFIX, controller='journal',
483 '%s/public_journal/atom' % ADMIN_PREFIX, controller='journal',
484 action="public_journal_atom")
484 action="public_journal_atom")
485
485
486 rmap.connect('public_journal_atom_old',
486 rmap.connect('public_journal_atom_old',
487 '%s/public_journal_atom' % ADMIN_PREFIX, controller='journal',
487 '%s/public_journal_atom' % ADMIN_PREFIX, controller='journal',
488 action="public_journal_atom")
488 action="public_journal_atom")
489
489
490 rmap.connect('toggle_following', '%s/toggle_following' % ADMIN_PREFIX,
490 rmap.connect('toggle_following', '%s/toggle_following' % ADMIN_PREFIX,
491 controller='journal', action='toggle_following',
491 controller='journal', action='toggle_following',
492 conditions=dict(method=["POST"]))
492 conditions=dict(method=["POST"]))
493
493
494 #SEARCH
494 #SEARCH
495 rmap.connect('search', '%s/search' % ADMIN_PREFIX, controller='search',)
495 rmap.connect('search', '%s/search' % ADMIN_PREFIX, controller='search',)
496 rmap.connect('search_repo_admin', '%s/search/{repo_name:.*}' % ADMIN_PREFIX,
496 rmap.connect('search_repo_admin', '%s/search/{repo_name:.*}' % ADMIN_PREFIX,
497 controller='search',
497 controller='search',
498 conditions=dict(function=check_repo))
498 conditions=dict(function=check_repo))
499 rmap.connect('search_repo', '/{repo_name:.*?}/search',
499 rmap.connect('search_repo', '/{repo_name:.*?}/search',
500 controller='search',
500 controller='search',
501 conditions=dict(function=check_repo),
501 conditions=dict(function=check_repo),
502 )
502 )
503
503
504 #LOGIN/LOGOUT/REGISTER/SIGN IN
504 #LOGIN/LOGOUT/REGISTER/SIGN IN
505 rmap.connect('login_home', '%s/login' % ADMIN_PREFIX, controller='login')
505 rmap.connect('login_home', '%s/login' % ADMIN_PREFIX, controller='login')
506 rmap.connect('logout_home', '%s/logout' % ADMIN_PREFIX, controller='login',
506 rmap.connect('logout_home', '%s/logout' % ADMIN_PREFIX, controller='login',
507 action='logout')
507 action='logout')
508
508
509 rmap.connect('register', '%s/register' % ADMIN_PREFIX, controller='login',
509 rmap.connect('register', '%s/register' % ADMIN_PREFIX, controller='login',
510 action='register')
510 action='register')
511
511
512 rmap.connect('reset_password', '%s/password_reset' % ADMIN_PREFIX,
512 rmap.connect('reset_password', '%s/password_reset' % ADMIN_PREFIX,
513 controller='login', action='password_reset')
513 controller='login', action='password_reset')
514
514
515 rmap.connect('reset_password_confirmation',
515 rmap.connect('reset_password_confirmation',
516 '%s/password_reset_confirmation' % ADMIN_PREFIX,
516 '%s/password_reset_confirmation' % ADMIN_PREFIX,
517 controller='login', action='password_reset_confirmation')
517 controller='login', action='password_reset_confirmation')
518
518
519 #FEEDS
519 #FEEDS
520 rmap.connect('rss_feed_home', '/{repo_name:.*?}/feed/rss',
520 rmap.connect('rss_feed_home', '/{repo_name:.*?}/feed/rss',
521 controller='feed', action='rss',
521 controller='feed', action='rss',
522 conditions=dict(function=check_repo))
522 conditions=dict(function=check_repo))
523
523
524 rmap.connect('atom_feed_home', '/{repo_name:.*?}/feed/atom',
524 rmap.connect('atom_feed_home', '/{repo_name:.*?}/feed/atom',
525 controller='feed', action='atom',
525 controller='feed', action='atom',
526 conditions=dict(function=check_repo))
526 conditions=dict(function=check_repo))
527
527
528 #==========================================================================
528 #==========================================================================
529 # REPOSITORY ROUTES
529 # REPOSITORY ROUTES
530 #==========================================================================
530 #==========================================================================
531 rmap.connect('repo_creating_home', '/{repo_name:.*?}/repo_creating',
531 rmap.connect('repo_creating_home', '/{repo_name:.*?}/repo_creating',
532 controller='admin/repos', action='repo_creating')
532 controller='admin/repos', action='repo_creating')
533 rmap.connect('repo_check_home', '/{repo_name:.*?}/crepo_check',
533 rmap.connect('repo_check_home', '/{repo_name:.*?}/crepo_check',
534 controller='admin/repos', action='repo_check')
534 controller='admin/repos', action='repo_check')
535
535
536 rmap.connect('summary_home', '/{repo_name:.*?}',
536 rmap.connect('summary_home', '/{repo_name:.*?}',
537 controller='summary',
537 controller='summary',
538 conditions=dict(function=check_repo))
538 conditions=dict(function=check_repo))
539
539
540 # must be here for proper group/repo catching
540 # must be here for proper group/repo catching
541 rmap.connect('repos_group_home', '/{group_name:.*}',
541 rmap.connect('repos_group_home', '/{group_name:.*}',
542 controller='admin/repo_groups', action="show_by_name",
542 controller='admin/repo_groups', action="show_by_name",
543 conditions=dict(function=check_group))
543 conditions=dict(function=check_group))
544 rmap.connect('repo_stats_home', '/{repo_name:.*?}/statistics',
544 rmap.connect('repo_stats_home', '/{repo_name:.*?}/statistics',
545 controller='summary', action='statistics',
545 controller='summary', action='statistics',
546 conditions=dict(function=check_repo))
546 conditions=dict(function=check_repo))
547
547
548 rmap.connect('repo_size', '/{repo_name:.*?}/repo_size',
548 rmap.connect('repo_size', '/{repo_name:.*?}/repo_size',
549 controller='summary', action='repo_size',
549 controller='summary', action='repo_size',
550 conditions=dict(function=check_repo))
550 conditions=dict(function=check_repo))
551
551
552 rmap.connect('branch_tag_switcher', '/{repo_name:.*?}/branches-tags',
552 rmap.connect('branch_tag_switcher', '/{repo_name:.*?}/branches-tags',
553 controller='home', action='branch_tag_switcher')
553 controller='home', action='branch_tag_switcher')
554 rmap.connect('repo_refs_data', '/{repo_name:.*?}/refs-data',
554 rmap.connect('repo_refs_data', '/{repo_name:.*?}/refs-data',
555 controller='home', action='repo_refs_data')
555 controller='home', action='repo_refs_data')
556
556
557 rmap.connect('changeset_home', '/{repo_name:.*?}/changeset/{revision}',
557 rmap.connect('changeset_home', '/{repo_name:.*?}/changeset/{revision}',
558 controller='changeset', revision='tip',
558 controller='changeset', revision='tip',
559 conditions=dict(function=check_repo))
559 conditions=dict(function=check_repo))
560 rmap.connect('changeset_children', '/{repo_name:.*?}/changeset_children/{revision}',
560 rmap.connect('changeset_children', '/{repo_name:.*?}/changeset_children/{revision}',
561 controller='changeset', revision='tip', action="changeset_children",
561 controller='changeset', revision='tip', action="changeset_children",
562 conditions=dict(function=check_repo))
562 conditions=dict(function=check_repo))
563 rmap.connect('changeset_parents', '/{repo_name:.*?}/changeset_parents/{revision}',
563 rmap.connect('changeset_parents', '/{repo_name:.*?}/changeset_parents/{revision}',
564 controller='changeset', revision='tip', action="changeset_parents",
564 controller='changeset', revision='tip', action="changeset_parents",
565 conditions=dict(function=check_repo))
565 conditions=dict(function=check_repo))
566
566
567 # repo edit options
567 # repo edit options
568 rmap.connect("edit_repo", "/{repo_name:.*?}/settings",
568 rmap.connect("edit_repo", "/{repo_name:.*?}/settings",
569 controller='admin/repos', action="edit",
569 controller='admin/repos', action="edit",
570 conditions=dict(method=["GET"], function=check_repo))
570 conditions=dict(method=["GET"], function=check_repo))
571
571
572 rmap.connect("edit_repo_perms", "/{repo_name:.*?}/settings/permissions",
572 rmap.connect("edit_repo_perms", "/{repo_name:.*?}/settings/permissions",
573 controller='admin/repos', action="edit_permissions",
573 controller='admin/repos', action="edit_permissions",
574 conditions=dict(method=["GET"], function=check_repo))
574 conditions=dict(method=["GET"], function=check_repo))
575 rmap.connect("edit_repo_perms_update", "/{repo_name:.*?}/settings/permissions",
575 rmap.connect("edit_repo_perms_update", "/{repo_name:.*?}/settings/permissions",
576 controller='admin/repos', action="edit_permissions_update",
576 controller='admin/repos', action="edit_permissions_update",
577 conditions=dict(method=["PUT"], function=check_repo))
577 conditions=dict(method=["PUT"], function=check_repo))
578 rmap.connect("edit_repo_perms_revoke", "/{repo_name:.*?}/settings/permissions",
578 rmap.connect("edit_repo_perms_revoke", "/{repo_name:.*?}/settings/permissions",
579 controller='admin/repos', action="edit_permissions_revoke",
579 controller='admin/repos', action="edit_permissions_revoke",
580 conditions=dict(method=["DELETE"], function=check_repo))
580 conditions=dict(method=["DELETE"], function=check_repo))
581
581
582 rmap.connect("edit_repo_fields", "/{repo_name:.*?}/settings/fields",
582 rmap.connect("edit_repo_fields", "/{repo_name:.*?}/settings/fields",
583 controller='admin/repos', action="edit_fields",
583 controller='admin/repos', action="edit_fields",
584 conditions=dict(method=["GET"], function=check_repo))
584 conditions=dict(method=["GET"], function=check_repo))
585 rmap.connect('create_repo_fields', "/{repo_name:.*?}/settings/fields/new",
585 rmap.connect('create_repo_fields', "/{repo_name:.*?}/settings/fields/new",
586 controller='admin/repos', action="create_repo_field",
586 controller='admin/repos', action="create_repo_field",
587 conditions=dict(method=["PUT"], function=check_repo))
587 conditions=dict(method=["PUT"], function=check_repo))
588 rmap.connect('delete_repo_fields', "/{repo_name:.*?}/settings/fields/{field_id}",
588 rmap.connect('delete_repo_fields', "/{repo_name:.*?}/settings/fields/{field_id}",
589 controller='admin/repos', action="delete_repo_field",
589 controller='admin/repos', action="delete_repo_field",
590 conditions=dict(method=["DELETE"], function=check_repo))
590 conditions=dict(method=["DELETE"], function=check_repo))
591
591
592
592
593 rmap.connect("edit_repo_advanced", "/{repo_name:.*?}/settings/advanced",
593 rmap.connect("edit_repo_advanced", "/{repo_name:.*?}/settings/advanced",
594 controller='admin/repos', action="edit_advanced",
594 controller='admin/repos', action="edit_advanced",
595 conditions=dict(method=["GET"], function=check_repo))
595 conditions=dict(method=["GET"], function=check_repo))
596
596
597 rmap.connect("edit_repo_advanced_locking", "/{repo_name:.*?}/settings/advanced/locking",
597 rmap.connect("edit_repo_advanced_locking", "/{repo_name:.*?}/settings/advanced/locking",
598 controller='admin/repos', action="edit_advanced_locking",
598 controller='admin/repos', action="edit_advanced_locking",
599 conditions=dict(method=["PUT"], function=check_repo))
599 conditions=dict(method=["PUT"], function=check_repo))
600 rmap.connect('toggle_locking', "/{repo_name:.*?}/settings/advanced/locking_toggle",
600 rmap.connect('toggle_locking', "/{repo_name:.*?}/settings/advanced/locking_toggle",
601 controller='admin/repos', action="toggle_locking",
601 controller='admin/repos', action="toggle_locking",
602 conditions=dict(method=["GET"], function=check_repo))
602 conditions=dict(method=["GET"], function=check_repo))
603
603
604 rmap.connect("edit_repo_advanced_journal", "/{repo_name:.*?}/settings/advanced/journal",
604 rmap.connect("edit_repo_advanced_journal", "/{repo_name:.*?}/settings/advanced/journal",
605 controller='admin/repos', action="edit_advanced_journal",
605 controller='admin/repos', action="edit_advanced_journal",
606 conditions=dict(method=["PUT"], function=check_repo))
606 conditions=dict(method=["PUT"], function=check_repo))
607
607
608 rmap.connect("edit_repo_advanced_fork", "/{repo_name:.*?}/settings/advanced/fork",
608 rmap.connect("edit_repo_advanced_fork", "/{repo_name:.*?}/settings/advanced/fork",
609 controller='admin/repos', action="edit_advanced_fork",
609 controller='admin/repos', action="edit_advanced_fork",
610 conditions=dict(method=["PUT"], function=check_repo))
610 conditions=dict(method=["PUT"], function=check_repo))
611
611
612
612
613 rmap.connect("edit_repo_caches", "/{repo_name:.*?}/settings/caches",
613 rmap.connect("edit_repo_caches", "/{repo_name:.*?}/settings/caches",
614 controller='admin/repos', action="edit_caches",
614 controller='admin/repos', action="edit_caches",
615 conditions=dict(method=["GET"], function=check_repo))
615 conditions=dict(method=["GET"], function=check_repo))
616 rmap.connect("edit_repo_caches", "/{repo_name:.*?}/settings/caches",
616 rmap.connect("edit_repo_caches", "/{repo_name:.*?}/settings/caches",
617 controller='admin/repos', action="edit_caches",
617 controller='admin/repos', action="edit_caches",
618 conditions=dict(method=["PUT"], function=check_repo))
618 conditions=dict(method=["PUT"], function=check_repo))
619
619
620
620
621 rmap.connect("edit_repo_remote", "/{repo_name:.*?}/settings/remote",
621 rmap.connect("edit_repo_remote", "/{repo_name:.*?}/settings/remote",
622 controller='admin/repos', action="edit_remote",
622 controller='admin/repos', action="edit_remote",
623 conditions=dict(method=["GET"], function=check_repo))
623 conditions=dict(method=["GET"], function=check_repo))
624 rmap.connect("edit_repo_remote", "/{repo_name:.*?}/settings/remote",
624 rmap.connect("edit_repo_remote", "/{repo_name:.*?}/settings/remote",
625 controller='admin/repos', action="edit_remote",
625 controller='admin/repos', action="edit_remote",
626 conditions=dict(method=["PUT"], function=check_repo))
626 conditions=dict(method=["PUT"], function=check_repo))
627
627
628 rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
628 rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
629 controller='admin/repos', action="edit_statistics",
629 controller='admin/repos', action="edit_statistics",
630 conditions=dict(method=["GET"], function=check_repo))
630 conditions=dict(method=["GET"], function=check_repo))
631 rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
631 rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
632 controller='admin/repos', action="edit_statistics",
632 controller='admin/repos', action="edit_statistics",
633 conditions=dict(method=["PUT"], function=check_repo))
633 conditions=dict(method=["PUT"], function=check_repo))
634
634
635 #still working url for backward compat.
635 #still working url for backward compat.
636 rmap.connect('raw_changeset_home_depraced',
636 rmap.connect('raw_changeset_home_depraced',
637 '/{repo_name:.*?}/raw-changeset/{revision}',
637 '/{repo_name:.*?}/raw-changeset/{revision}',
638 controller='changeset', action='changeset_raw',
638 controller='changeset', action='changeset_raw',
639 revision='tip', conditions=dict(function=check_repo))
639 revision='tip', conditions=dict(function=check_repo))
640
640
641 ## new URLs
641 ## new URLs
642 rmap.connect('changeset_raw_home',
642 rmap.connect('changeset_raw_home',
643 '/{repo_name:.*?}/changeset-diff/{revision}',
643 '/{repo_name:.*?}/changeset-diff/{revision}',
644 controller='changeset', action='changeset_raw',
644 controller='changeset', action='changeset_raw',
645 revision='tip', conditions=dict(function=check_repo))
645 revision='tip', conditions=dict(function=check_repo))
646
646
647 rmap.connect('changeset_patch_home',
647 rmap.connect('changeset_patch_home',
648 '/{repo_name:.*?}/changeset-patch/{revision}',
648 '/{repo_name:.*?}/changeset-patch/{revision}',
649 controller='changeset', action='changeset_patch',
649 controller='changeset', action='changeset_patch',
650 revision='tip', conditions=dict(function=check_repo))
650 revision='tip', conditions=dict(function=check_repo))
651
651
652 rmap.connect('changeset_download_home',
652 rmap.connect('changeset_download_home',
653 '/{repo_name:.*?}/changeset-download/{revision}',
653 '/{repo_name:.*?}/changeset-download/{revision}',
654 controller='changeset', action='changeset_download',
654 controller='changeset', action='changeset_download',
655 revision='tip', conditions=dict(function=check_repo))
655 revision='tip', conditions=dict(function=check_repo))
656
656
657 rmap.connect('changeset_comment',
657 rmap.connect('changeset_comment',
658 '/{repo_name:.*?}/changeset/{revision}/comment',
658 '/{repo_name:.*?}/changeset/{revision}/comment',
659 controller='changeset', revision='tip', action='comment',
659 controller='changeset', revision='tip', action='comment',
660 conditions=dict(function=check_repo))
660 conditions=dict(function=check_repo))
661
661
662 rmap.connect('changeset_comment_preview',
662 rmap.connect('changeset_comment_preview',
663 '/{repo_name:.*?}/changeset/comment/preview',
663 '/{repo_name:.*?}/changeset/comment/preview',
664 controller='changeset', action='preview_comment',
664 controller='changeset', action='preview_comment',
665 conditions=dict(function=check_repo, method=["POST"]))
665 conditions=dict(function=check_repo, method=["POST"]))
666
666
667 rmap.connect('changeset_comment_delete',
667 rmap.connect('changeset_comment_delete',
668 '/{repo_name:.*?}/changeset/comment/{comment_id}/delete',
668 '/{repo_name:.*?}/changeset/comment/{comment_id}/delete',
669 controller='changeset', action='delete_comment',
669 controller='changeset', action='delete_comment',
670 conditions=dict(function=check_repo, method=["DELETE"]))
670 conditions=dict(function=check_repo, method=["DELETE"]))
671
671
672 rmap.connect('changeset_info', '/changeset_info/{repo_name:.*?}/{revision}',
672 rmap.connect('changeset_info', '/changeset_info/{repo_name:.*?}/{revision}',
673 controller='changeset', action='changeset_info')
673 controller='changeset', action='changeset_info')
674
674
675 rmap.connect('compare_home',
675 rmap.connect('compare_home',
676 '/{repo_name:.*?}/compare',
676 '/{repo_name:.*?}/compare',
677 controller='compare', action='index',
677 controller='compare', action='index',
678 conditions=dict(function=check_repo))
678 conditions=dict(function=check_repo))
679
679
680 rmap.connect('compare_url',
680 rmap.connect('compare_url',
681 '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref:.*?}...{other_ref_type}@{other_ref:.*?}',
681 '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref:.*?}...{other_ref_type}@{other_ref:.*?}',
682 controller='compare', action='compare',
682 controller='compare', action='compare',
683 conditions=dict(function=check_repo),
683 conditions=dict(function=check_repo),
684 requirements=dict(
684 requirements=dict(
685 org_ref_type='(branch|book|tag|rev|__other_ref_type__)',
685 org_ref_type='(branch|book|tag|rev|__other_ref_type__)',
686 other_ref_type='(branch|book|tag|rev|__org_ref_type__)')
686 other_ref_type='(branch|book|tag|rev|__org_ref_type__)')
687 )
687 )
688
688
689 rmap.connect('pullrequest_home',
689 rmap.connect('pullrequest_home',
690 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
690 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
691 action='index', conditions=dict(function=check_repo,
691 action='index', conditions=dict(function=check_repo,
692 method=["GET"]))
692 method=["GET"]))
693
693
694 rmap.connect('pullrequest',
694 rmap.connect('pullrequest',
695 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
695 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
696 action='create', conditions=dict(function=check_repo,
696 action='create', conditions=dict(function=check_repo,
697 method=["POST"]))
697 method=["POST"]))
698
698
699 rmap.connect('pullrequest_show',
699 rmap.connect('pullrequest_show',
700 '/{repo_name:.*?}/pull-request/{pull_request_id}',
700 '/{repo_name:.*?}/pull-request/{pull_request_id}',
701 controller='pullrequests',
701 controller='pullrequests',
702 action='show', conditions=dict(function=check_repo,
702 action='show', conditions=dict(function=check_repo,
703 method=["GET"]))
703 method=["GET"]))
704 rmap.connect('pullrequest_update',
704 rmap.connect('pullrequest_update',
705 '/{repo_name:.*?}/pull-request/{pull_request_id}',
705 '/{repo_name:.*?}/pull-request/{pull_request_id}',
706 controller='pullrequests',
706 controller='pullrequests',
707 action='update', conditions=dict(function=check_repo,
707 action='update', conditions=dict(function=check_repo,
708 method=["PUT"]))
708 method=["PUT"]))
709 rmap.connect('pullrequest_delete',
709 rmap.connect('pullrequest_delete',
710 '/{repo_name:.*?}/pull-request/{pull_request_id}',
710 '/{repo_name:.*?}/pull-request/{pull_request_id}',
711 controller='pullrequests',
711 controller='pullrequests',
712 action='delete', conditions=dict(function=check_repo,
712 action='delete', conditions=dict(function=check_repo,
713 method=["DELETE"]))
713 method=["DELETE"]))
714
714
715 rmap.connect('pullrequest_show_all',
715 rmap.connect('pullrequest_show_all',
716 '/{repo_name:.*?}/pull-request',
716 '/{repo_name:.*?}/pull-request',
717 controller='pullrequests',
717 controller='pullrequests',
718 action='show_all', conditions=dict(function=check_repo,
718 action='show_all', conditions=dict(function=check_repo,
719 method=["GET"]))
719 method=["GET"]))
720
720
721 rmap.connect('pullrequest_comment',
721 rmap.connect('pullrequest_comment',
722 '/{repo_name:.*?}/pull-request-comment/{pull_request_id}',
722 '/{repo_name:.*?}/pull-request-comment/{pull_request_id}',
723 controller='pullrequests',
723 controller='pullrequests',
724 action='comment', conditions=dict(function=check_repo,
724 action='comment', conditions=dict(function=check_repo,
725 method=["POST"]))
725 method=["POST"]))
726
726
727 rmap.connect('pullrequest_comment_delete',
727 rmap.connect('pullrequest_comment_delete',
728 '/{repo_name:.*?}/pull-request-comment/{comment_id}/delete',
728 '/{repo_name:.*?}/pull-request-comment/{comment_id}/delete',
729 controller='pullrequests', action='delete_comment',
729 controller='pullrequests', action='delete_comment',
730 conditions=dict(function=check_repo, method=["DELETE"]))
730 conditions=dict(function=check_repo, method=["DELETE"]))
731
731
732 rmap.connect('summary_home_summary', '/{repo_name:.*?}/summary',
732 rmap.connect('summary_home_summary', '/{repo_name:.*?}/summary',
733 controller='summary', conditions=dict(function=check_repo))
733 controller='summary', conditions=dict(function=check_repo))
734
734
735 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
735 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
736 controller='branches', conditions=dict(function=check_repo))
736 controller='branches', conditions=dict(function=check_repo))
737
737
738 rmap.connect('tags_home', '/{repo_name:.*?}/tags',
738 rmap.connect('tags_home', '/{repo_name:.*?}/tags',
739 controller='tags', conditions=dict(function=check_repo))
739 controller='tags', conditions=dict(function=check_repo))
740
740
741 rmap.connect('bookmarks_home', '/{repo_name:.*?}/bookmarks',
741 rmap.connect('bookmarks_home', '/{repo_name:.*?}/bookmarks',
742 controller='bookmarks', conditions=dict(function=check_repo))
742 controller='bookmarks', conditions=dict(function=check_repo))
743
743
744 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
744 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
745 controller='changelog', conditions=dict(function=check_repo))
745 controller='changelog', conditions=dict(function=check_repo))
746
746
747 rmap.connect('changelog_summary_home', '/{repo_name:.*?}/changelog_summary',
747 rmap.connect('changelog_summary_home', '/{repo_name:.*?}/changelog_summary',
748 controller='changelog', action='changelog_summary',
748 controller='changelog', action='changelog_summary',
749 conditions=dict(function=check_repo))
749 conditions=dict(function=check_repo))
750
750
751 rmap.connect('changelog_file_home', '/{repo_name:.*?}/changelog/{revision}/{f_path:.*}',
751 rmap.connect('changelog_file_home', '/{repo_name:.*?}/changelog/{revision}/{f_path:.*}',
752 controller='changelog', f_path=None,
752 controller='changelog', f_path=None,
753 conditions=dict(function=check_repo))
753 conditions=dict(function=check_repo))
754
754
755 rmap.connect('changelog_details', '/{repo_name:.*?}/changelog_details/{cs}',
755 rmap.connect('changelog_details', '/{repo_name:.*?}/changelog_details/{cs}',
756 controller='changelog', action='changelog_details',
756 controller='changelog', action='changelog_details',
757 conditions=dict(function=check_repo))
757 conditions=dict(function=check_repo))
758
758
759 rmap.connect('files_home', '/{repo_name:.*?}/files/{revision}/{f_path:.*}',
759 rmap.connect('files_home', '/{repo_name:.*?}/files/{revision}/{f_path:.*}',
760 controller='files', revision='tip', f_path='',
760 controller='files', revision='tip', f_path='',
761 conditions=dict(function=check_repo))
761 conditions=dict(function=check_repo))
762
762
763 rmap.connect('files_home_nopath', '/{repo_name:.*?}/files/{revision}',
763 rmap.connect('files_home_nopath', '/{repo_name:.*?}/files/{revision}',
764 controller='files', revision='tip', f_path='',
764 controller='files', revision='tip', f_path='',
765 conditions=dict(function=check_repo))
765 conditions=dict(function=check_repo))
766
766
767 rmap.connect('files_history_home',
767 rmap.connect('files_history_home',
768 '/{repo_name:.*?}/history/{revision}/{f_path:.*}',
768 '/{repo_name:.*?}/history/{revision}/{f_path:.*}',
769 controller='files', action='history', revision='tip', f_path='',
769 controller='files', action='history', revision='tip', f_path='',
770 conditions=dict(function=check_repo))
770 conditions=dict(function=check_repo))
771
771
772 rmap.connect('files_authors_home',
772 rmap.connect('files_authors_home',
773 '/{repo_name:.*?}/authors/{revision}/{f_path:.*}',
773 '/{repo_name:.*?}/authors/{revision}/{f_path:.*}',
774 controller='files', action='authors', revision='tip', f_path='',
774 controller='files', action='authors', revision='tip', f_path='',
775 conditions=dict(function=check_repo))
775 conditions=dict(function=check_repo))
776
776
777 rmap.connect('files_diff_home', '/{repo_name:.*?}/diff/{f_path:.*}',
777 rmap.connect('files_diff_home', '/{repo_name:.*?}/diff/{f_path:.*}',
778 controller='files', action='diff', revision='tip', f_path='',
778 controller='files', action='diff', revision='tip', f_path='',
779 conditions=dict(function=check_repo))
779 conditions=dict(function=check_repo))
780
780
781 rmap.connect('files_diff_2way_home', '/{repo_name:.*?}/diff-2way/{f_path:.*}',
781 rmap.connect('files_diff_2way_home', '/{repo_name:.*?}/diff-2way/{f_path:.*}',
782 controller='files', action='diff_2way', revision='tip', f_path='',
782 controller='files', action='diff_2way', revision='tip', f_path='',
783 conditions=dict(function=check_repo))
783 conditions=dict(function=check_repo))
784
784
785 rmap.connect('files_rawfile_home',
785 rmap.connect('files_rawfile_home',
786 '/{repo_name:.*?}/rawfile/{revision}/{f_path:.*}',
786 '/{repo_name:.*?}/rawfile/{revision}/{f_path:.*}',
787 controller='files', action='rawfile', revision='tip',
787 controller='files', action='rawfile', revision='tip',
788 f_path='', conditions=dict(function=check_repo))
788 f_path='', conditions=dict(function=check_repo))
789
789
790 rmap.connect('files_raw_home',
790 rmap.connect('files_raw_home',
791 '/{repo_name:.*?}/raw/{revision}/{f_path:.*}',
791 '/{repo_name:.*?}/raw/{revision}/{f_path:.*}',
792 controller='files', action='raw', revision='tip', f_path='',
792 controller='files', action='raw', revision='tip', f_path='',
793 conditions=dict(function=check_repo))
793 conditions=dict(function=check_repo))
794
794
795 rmap.connect('files_annotate_home',
795 rmap.connect('files_annotate_home',
796 '/{repo_name:.*?}/annotate/{revision}/{f_path:.*}',
796 '/{repo_name:.*?}/annotate/{revision}/{f_path:.*}',
797 controller='files', action='index', revision='tip',
797 controller='files', action='index', revision='tip',
798 f_path='', annotate=True, conditions=dict(function=check_repo))
798 f_path='', annotate=True, conditions=dict(function=check_repo))
799
799
800 rmap.connect('files_edit_home',
800 rmap.connect('files_edit_home',
801 '/{repo_name:.*?}/edit/{revision}/{f_path:.*}',
801 '/{repo_name:.*?}/edit/{revision}/{f_path:.*}',
802 controller='files', action='edit', revision='tip',
802 controller='files', action='edit', revision='tip',
803 f_path='', conditions=dict(function=check_repo))
803 f_path='', conditions=dict(function=check_repo))
804
804
805 rmap.connect('files_add_home',
805 rmap.connect('files_add_home',
806 '/{repo_name:.*?}/add/{revision}/{f_path:.*}',
806 '/{repo_name:.*?}/add/{revision}/{f_path:.*}',
807 controller='files', action='add', revision='tip',
807 controller='files', action='add', revision='tip',
808 f_path='', conditions=dict(function=check_repo))
808 f_path='', conditions=dict(function=check_repo))
809
809
810 rmap.connect('files_delete_home',
810 rmap.connect('files_delete_home',
811 '/{repo_name:.*?}/delete/{revision}/{f_path:.*}',
811 '/{repo_name:.*?}/delete/{revision}/{f_path:.*}',
812 controller='files', action='delete', revision='tip',
812 controller='files', action='delete', revision='tip',
813 f_path='', conditions=dict(function=check_repo))
813 f_path='', conditions=dict(function=check_repo))
814
814
815 rmap.connect('files_archive_home', '/{repo_name:.*?}/archive/{fname}',
815 rmap.connect('files_archive_home', '/{repo_name:.*?}/archive/{fname}',
816 controller='files', action='archivefile',
816 controller='files', action='archivefile',
817 conditions=dict(function=check_repo))
817 conditions=dict(function=check_repo))
818
818
819 rmap.connect('files_nodelist_home',
819 rmap.connect('files_nodelist_home',
820 '/{repo_name:.*?}/nodelist/{revision}/{f_path:.*}',
820 '/{repo_name:.*?}/nodelist/{revision}/{f_path:.*}',
821 controller='files', action='nodelist',
821 controller='files', action='nodelist',
822 conditions=dict(function=check_repo))
822 conditions=dict(function=check_repo))
823
823
824 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork',
824 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork',
825 controller='forks', action='fork_create',
825 controller='forks', action='fork_create',
826 conditions=dict(function=check_repo, method=["POST"]))
826 conditions=dict(function=check_repo, method=["POST"]))
827
827
828 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork',
828 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork',
829 controller='forks', action='fork',
829 controller='forks', action='fork',
830 conditions=dict(function=check_repo))
830 conditions=dict(function=check_repo))
831
831
832 rmap.connect('repo_forks_home', '/{repo_name:.*?}/forks',
832 rmap.connect('repo_forks_home', '/{repo_name:.*?}/forks',
833 controller='forks', action='forks',
833 controller='forks', action='forks',
834 conditions=dict(function=check_repo))
834 conditions=dict(function=check_repo))
835
835
836 rmap.connect('repo_followers_home', '/{repo_name:.*?}/followers',
836 rmap.connect('repo_followers_home', '/{repo_name:.*?}/followers',
837 controller='followers', action='followers',
837 controller='followers', action='followers',
838 conditions=dict(function=check_repo))
838 conditions=dict(function=check_repo))
839
839
840 return rmap
840 return rmap
General Comments 0
You need to be logged in to leave comments. Login now