updates for getting ready for production

This commit is contained in:
Patrick McDonagh
2017-03-08 12:04:02 -06:00
parent aab7537972
commit 5dbbea1a71
4 changed files with 26 additions and 4 deletions

7
pocwww/generate_cert.sh Normal file
View 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/

View File

@@ -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}')

View File

@@ -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')

View File

@@ -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