updates for getting ready for production
This commit is contained in:
7
pocwww/generate_cert.sh
Normal file
7
pocwww/generate_cert.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /root/ssl
|
||||
FQDN=$(hostname -f)
|
||||
openssl req -newkey rsa:2048 -nodes -keyout poc.key -x509 -days 365 -out poc.crt -subj "/C=US/ST=Texas/L=Dallas/O=Henry Pump/CN=$FQDN"
|
||||
mv poc.key /root/ssl/
|
||||
mv poc.crt /root/ssl/
|
||||
@@ -124,6 +124,7 @@ def main(global_config, **settings):
|
||||
config.add_route('home', '/')
|
||||
config.add_route('json_snapshot', '/json')
|
||||
|
||||
config.add_route('cards_page', '/cards/{cards_date}/{page_num}')
|
||||
config.add_route('json_cards_page', '/json/cards/{cards_date}/{page_num}')
|
||||
config.add_route('cards_date', '/cards/{cards_date}')
|
||||
config.add_route('json_cards_date', '/json/cards/{cards_date}')
|
||||
|
||||
@@ -18,6 +18,7 @@ def cards(request):
|
||||
return {'datelist': get_all_dates_with_cards(request), 'navgroup': 'cards'}
|
||||
|
||||
|
||||
@view_config(route_name='cards_page', renderer='templates/cardlist.jinja2')
|
||||
@view_config(route_name='cards_date', renderer='templates/cardlist.jinja2')
|
||||
@view_config(route_name='json_cards_date', renderer='prettyjson')
|
||||
@view_config(route_name='json_cards_page', renderer='prettyjson')
|
||||
|
||||
@@ -3,14 +3,24 @@
|
||||
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
|
||||
###
|
||||
|
||||
[app:main]
|
||||
use = egg:pocwww
|
||||
|
||||
[app:pocwww]
|
||||
use = egg:pocwww#main
|
||||
pyramid.reload_templates = false
|
||||
pyramid.debug_authorization = false
|
||||
pyramid.debug_notfound = false
|
||||
pyramid.debug_routematch = false
|
||||
pyramid.default_locale_name = en
|
||||
mongo_uri = mongodb://localhost:27017/poc
|
||||
|
||||
|
||||
#---------- Pipeline Configuration ----------
|
||||
[filter:paste_prefix]
|
||||
use = egg:PasteDeploy#prefix
|
||||
|
||||
[pipeline:main]
|
||||
pipeline =
|
||||
paste_prefix
|
||||
pocwww
|
||||
|
||||
###
|
||||
# wsgi server configuration
|
||||
@@ -18,7 +28,10 @@ pyramid.default_locale_name = en
|
||||
|
||||
[server:main]
|
||||
use = egg:waitress#main
|
||||
listen = *:6543
|
||||
host = 127.0.0.1
|
||||
port = %(http_port)s
|
||||
|
||||
|
||||
|
||||
###
|
||||
# logging configuration
|
||||
|
||||
Reference in New Issue
Block a user