##// END OF EJS Templates
update setup script and config tmpl
marcink -
r456:6b54caa8 default
parent child Browse files
Show More
@@ -1,60 +1,156
1 #
1 ################################################################################
2 # pylons_app - Pylons configuration
2 ################################################################################
3 #
3 # hg-app - Pylons environment configuration #
4 # The %(here)s variable will be replaced with the parent directory of this file
4 # #
5 #
5 # The %(here)s variable will be replaced with the parent directory of this file#
6 ################################################################################
7
6 [DEFAULT]
8 [DEFAULT]
7 debug = true
9 debug = true
8 email_to = you@yourdomain.com
10 ############################################
9 smtp_server = localhost
11 ## Uncomment and replace with the address ##
10 error_email_from = paste@localhost
12 ## which should receive any error reports ##
13 ############################################
14 #email_to = admin@localhost
15 #smtp_server = mail.server.com
16 #error_email_from = paste_error@localhost
17 #smtp_username =
18 #smtp_password =
19 #error_message = 'hp-app crash !'
11
20
12 [server:main]
21 [server:main]
22 ##nr of threads to spawn
23 threadpool_workers = 5
24
25 ##max request before thread respawn
26 threadpool_max_requests = 2
27
28 ##option to use threads of process
29 use_threadpool = true
30
13 use = egg:Paste#http
31 use = egg:Paste#http
14 host = 0.0.0.0
32 host = 127.0.0.1
15 port = 5000
33 port = 8001
16
34
17 [app:main]
35 [app:main]
18 use = egg:pylons_app
36 use = egg:pylons_app
19 full_stack = true
37 full_stack = true
20 static_files = true
38 static_files = false
21
39 lang=en
22 cache_dir = %(here)s/data
40 cache_dir = %(here)s/data
23 beaker.session.key = pylons_app
24 beaker.session.secret = ${app_instance_secret}
25 app_instance_uuid = ${app_instance_uuid}
41 app_instance_uuid = ${app_instance_uuid}
26
42
27 # If you'd like to fine-tune the individual locations of the cache data dirs
43 ####################################
28 # for the Cache data, or the Session saves, un-comment the desired settings
44 ### BEAKER CACHE ####
29 # here:
45 ####################################
30 #beaker.cache.data_dir = %(here)s/data/cache
46 beaker.cache.data_dir=/%(here)s/data/cache/data
31 #beaker.session.data_dir = %(here)s/data/sessions
47 beaker.cache.lock_dir=/%(here)s/data/cache/lock
48 beaker.cache.regions=super_short_term,short_term,long_term
49 beaker.cache.long_term.type=memory
50 beaker.cache.long_term.expire=36000
51 beaker.cache.short_term.type=memory
52 beaker.cache.short_term.expire=60
53 beaker.cache.super_short_term.type=memory
54 beaker.cache.super_short_term.expire=10
32
55
33 # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
56 ####################################
34 # Debug mode will enable the interactive debugging tool, allowing ANYONE to
57 ### BEAKER SESSION ####
35 # execute malicious code after an exception is raised.
58 ####################################
59 ## Type of storage used for the session, current types are
60 ## dbm, file, memcached, database, and memory.
61 ## The storage uses the Container API
62 ##that is also used by the cache system.
63 beaker.session.type = file
64
65 beaker.session.key = hg-app
66 beaker.session.secret = ${app_instance_secret}
67 beaker.session.timeout = 36000
68
69 ##auto save the session to not to use .save()
70 beaker.session.auto = False
71
72 ##true exire at browser close
73 #beaker.session.cookie_expires = 3600
74
75
76 ################################################################################
77 ## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* ##
78 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
79 ## execute malicious code after an exception is raised. ##
80 ################################################################################
36 set debug = false
81 set debug = false
37
82
83 ##################################
84 ### LOGVIEW CONFIG ###
85 ##################################
86 logview.sqlalchemy = #faa
87 logview.pylons.templating = #bfb
88 logview.pylons.util = #eee
38
89
39 # Logging configuration
90 #########################################################
91 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
92 #########################################################
93 sqlalchemy.db1.url = sqlite:///%(here)s/hg_app.db
94 #sqlalchemy.db1.echo = False
95 #sqlalchemy.db1.pool_recycle = 3600
96 sqlalchemy.convert_unicode = true
97
98 ################################
99 ### LOGGING CONFIGURATION ####
100 ################################
40 [loggers]
101 [loggers]
41 keys = root
102 keys = root, routes, pylons_app, sqlalchemy
42
103
43 [handlers]
104 [handlers]
44 keys = console
105 keys = console
45
106
46 [formatters]
107 [formatters]
47 keys = generic
108 keys = generic,color_formatter
48
109
110 #############
111 ## LOGGERS ##
112 #############
49 [logger_root]
113 [logger_root]
50 level = INFO
114 level = INFO
51 handlers = console
115 handlers = console
52
116
117 [logger_routes]
118 level = INFO
119 handlers = console
120 qualname = routes.middleware
121 # "level = DEBUG" logs the route matched and routing variables.
122
123 [logger_pylons_app]
124 level = DEBUG
125 handlers = console
126 qualname = pylons_app
127 propagate = 0
128
129 [logger_sqlalchemy]
130 level = ERROR
131 handlers = console
132 qualname = sqlalchemy.engine
133 propagate = 0
134
135 ##############
136 ## HANDLERS ##
137 ##############
138
53 [handler_console]
139 [handler_console]
54 class = StreamHandler
140 class = StreamHandler
55 args = (sys.stderr,)
141 args = (sys.stderr,)
56 level = NOTSET
142 level = NOTSET
57 formatter = generic
143 formatter = color_formatter
144
145 ################
146 ## FORMATTERS ##
147 ################
58
148
59 [formatter_generic]
149 [formatter_generic]
60 format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
150 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
151 datefmt = %Y-%m-%d %H:%M:%S
152
153 [formatter_color_formatter]
154 class=pylons_app.lib.colored_formatter.ColorFormatter
155 format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
156 datefmt = %Y-%m-%d %H:%M:%S No newline at end of file
@@ -1,47 +1,47
1 from pylons_app import get_version
1 from pylons_app import get_version
2 try:
2 try:
3 from setuptools import setup, find_packages
3 from setuptools import setup, find_packages
4 except ImportError:
4 except ImportError:
5 from ez_setup import use_setuptools
5 from ez_setup import use_setuptools
6 use_setuptools()
6 use_setuptools()
7 from setuptools import setup, find_packages
7 from setuptools import setup, find_packages
8
8
9 setup(
9 setup(
10 name='hg_app',
10 name='hg-app',
11 version=get_version(),
11 version=get_version(),
12 description='Mercurial repository serving and browsing app',
12 description='Mercurial repository serving and browsing app',
13 keywords='mercurial web hgwebdir replacement serving hgweb',
13 keywords='mercurial web hgwebdir replacement serving hgweb',
14 license='BSD',
14 license='BSD',
15 author='marcin kuzminski',
15 author='marcin kuzminski',
16 author_email='marcin@python-works.com',
16 author_email='marcin@python-works.com',
17 url='http://hg.python-works.com',
17 url='http://hg.python-works.com',
18 install_requires=[
18 install_requires=[
19 "Pylons>=1.0.0",
19 "Pylons>=1.0.0",
20 "SQLAlchemy>=0.6",
20 "SQLAlchemy>=0.6",
21 "Mako>=0.3.2",
21 "Mako>=0.3.2",
22 "vcs>=0.1.4",
22 "vcs>=0.1.4",
23 "pygments>=1.3.0",
23 "pygments>=1.3.0",
24 "mercurial>=1.6",
24 "mercurial>=1.6",
25 "pysqlite",
25 "pysqlite",
26 "whoosh==1.0.0b9",
26 "whoosh==1.0.0b9",
27 "py-bcrypt",
27 "py-bcrypt",
28 ],
28 ],
29 setup_requires=["PasteScript>=1.6.3"],
29 setup_requires=["PasteScript>=1.6.3"],
30 packages=find_packages(exclude=['ez_setup']),
30 packages=find_packages(exclude=['ez_setup']),
31 include_package_data=True,
31 include_package_data=True,
32 test_suite='nose.collector',
32 test_suite='nose.collector',
33 package_data={'pylons_app': ['i18n/*/LC_MESSAGES/*.mo']},
33 package_data={'pylons_app': ['i18n/*/LC_MESSAGES/*.mo']},
34 message_extractors={'pylons_app': [
34 message_extractors={'pylons_app': [
35 ('**.py', 'python', None),
35 ('**.py', 'python', None),
36 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
36 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
37 ('public/**', 'ignore', None)]},
37 ('public/**', 'ignore', None)]},
38 zip_safe=False,
38 zip_safe=False,
39 paster_plugins=['PasteScript', 'Pylons'],
39 paster_plugins=['PasteScript', 'Pylons'],
40 entry_points="""
40 entry_points="""
41 [paste.app_factory]
41 [paste.app_factory]
42 main = pylons_app.config.middleware:make_app
42 main = pylons_app.config.middleware:make_app
43
43
44 [paste.app_install]
44 [paste.app_install]
45 main = pylons.util:PylonsInstaller
45 main = pylons.util:PylonsInstaller
46 """,
46 """,
47 )
47 )
General Comments 0
You need to be logged in to leave comments. Login now