try to build just and please with a setting coming from secrets.yml

pull/1/head
Raymond Yee 2016-11-16 17:21:22 -08:00
parent 2b82c6c786
commit 16c78485ea
6 changed files with 14 additions and 14 deletions

View File

@ -1,9 +0,0 @@
#!/usr/bin/env python
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.just")
os.environ['CELERY_LOADER'] = 'django'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

View File

@ -40,7 +40,8 @@ EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = 'accounts@gluejar.com'
# googlebooks
GOOGLE_BOOKS_API_KEY = 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0'
# GOOGLE_BOOKS_API_KEY = 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0'
GOOGLE_BOOKS_API_KEY = os.environ.get('GOOGLE_BOOKS_API_KEY', '')
# twitter auth
SOCIAL_AUTH_TWITTER_KEY = 'sd9StEg1N1qB8gGb2GRX4A'

6
vagrant/Vagrantfile vendored
View File

@ -30,7 +30,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"-e class=please",
"-e hostname=please.unglue.it",
"-e setdns=true",
"-e branch=dj18postdj18"
"-e branch=open_source"
]
end
@ -94,7 +94,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"-e class=just",
"-e hostname=just.unglue.it",
"-e setdns=false",
"-e branch=master",
"-e branch=open_source",
"-e do_migrate=false"
]
@ -152,7 +152,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"-e class=just",
"-e hostname=just2.unglue.it",
"-e setdns=false",
"-e branch=master",
"-e branch=open_source",
"-e do_migrate=false"
]

View File

@ -242,6 +242,12 @@
- name: make /var/log/regluit
file: path=/var/log/regluit state=directory owner={{user}} group=www-data mode=2775
# create the wsgi script from the appropriate template
- name: create the wsgi script from the appropriate template
template: src=templates/{{class}}.wsgi.j2 dest=/opt/regluit/deploy/{{class}}.wsgi owner={{user}} group={{user}} mode=0664
when: class in ['please', 'just']
#Run syncdb on the application
# TO DO: syncdb might be deprecated
# http://stackoverflow.com/a/29683785

View File

@ -5,7 +5,7 @@ import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.just")
os.environ['CELERY_LOADER'] = 'django'
os.environ['GOOGLE_BOOKS_API_KEY'] = {{GOOGLE_BOOKS_API_KEY}}
os.environ['GOOGLE_BOOKS_API_KEY'] = '{{GOOGLE_BOOKS_API_KEY}}'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

View File

@ -5,5 +5,7 @@ import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "regluit.settings.please")
os.environ['CELERY_LOADER'] = 'django'
os.environ['GOOGLE_BOOKS_API_KEY'] = '{{GOOGLE_BOOKS_API_KEY}}'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()