Skip to content

Commit

Permalink
Tweaks to fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyontour committed May 25, 2015
1 parent c7fd315 commit 8958910
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/debug_passenger_wsgi.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try:
os.environ["DB_HOST"] = "%(DB_HOST)s"
os.environ["SECRET_KEY"] = "%(SECRET_KEY)s"
os.environ["ALLOWED_HOSTS"] = "%(DOMAIN)s"
os.environ["SITENAME"] = "%(SITENAME)s"
os.environ["SITENAME"] = "%(sitename)s"

except Exception, e:
tb = traceback.format_exc()
Expand Down
2 changes: 1 addition & 1 deletion config/passenger_wsgi.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ os.environ["DB_PASS"] = "%(DB_PASS)s"
os.environ["DB_HOST"] = "%(DB_HOST)s"
os.environ["SECRET_KEY"] = "%(SECRET_KEY)s"
os.environ["ALLOWED_HOSTS"] = "%(DOMAIN)s"
os.environ["SITENAME"] = "%(SITENAME)s"
os.environ["SITENAME"] = "%(sitename)s"

import django.core.handlers.wsgi

Expand Down
8 changes: 4 additions & 4 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def _get_config(key="live"):
with open("secrets.json") as f:
data = json.loads(f.read())

if key not in data:
for k in [key, "project", "gituser", "sitename"]
raise Exception("Key '%(key)s' not in %(filename)s" % {'key': key, 'filename': "secrets.json"})
for k in [key, "project", "gituser", "sitename"]:
if k not in data:
raise Exception("Key '%(key)s' not in %(filename)s" % {'key': k, 'filename': "secrets.json"})
secrets = data[key]
env.user = secrets['SHELL_USER']
env.hosts = [secrets['DOMAIN']]
Expand Down Expand Up @@ -79,7 +79,7 @@ def setup_venv():
run("PYTHONPATH=/home/%(shell_user)s/bin pip install virtualenv" % {'shell_user': secrets['SHELL_USER']})
run("PYTHONPATH=/home/%(shell_user)s/bin virtualenv %(venv)s" % {'shell_user': secrets['SHELL_USER'], 'venv': venv})

def setup_passenger(force=False):
def setup_passenger():
with cd("/home/%s/%s" % (secrets['SHELL_USER'], secrets['DOMAIN'])):
upload_template("config/passenger_wsgi.tmpl",
"passenger_wsgi.py",
Expand Down
2 changes: 1 addition & 1 deletion secrets.json.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"project": "",
"gituser": "",
"sitename": "stubside.com",
"sitename": "",
"live" : {
"SECRET_KEY": "",
"SHELL_USER": "",
Expand Down

0 comments on commit 8958910

Please sign in to comment.