-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #766 from memex-explorer/ahmadia/tag-0.4
ahmadia/tag 0.4
- Loading branch information
Showing
7 changed files
with
227 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
""" | ||
Django settings for memex project. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.7/topics/settings/ | ||
For the full list of settings and their values, see | ||
https://docs.djangoproject.com/en/1.7/ref/settings/ | ||
""" | ||
|
||
from common_settings import * | ||
import os | ||
|
||
# SECURITY WARNING: Not setting VIRTUAL_HOST prevents Django from being able to verify headers | ||
ALLOWED_HOSTS = [os.environ.get('VIRTUAL_HOST', '*')] | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = '0#t((zq66&3*87djaltu-pn34%0p!*v_332f2p!$2i)w5y17f8' | ||
|
||
# SECURITY WARNING: don't run with debug turned on in production! | ||
PRODUCTION = os.environ.get('PRODUCTION', False) | ||
|
||
# when INLINE is true point to local sources for changes/documentation instead of remote ones | ||
INLINE = os.environ.get('INLINE', False) | ||
|
||
if PRODUCTION: | ||
DEBUG = False | ||
TEMPLATE_DEBUG = False | ||
DEPLOYMENT = True | ||
else: | ||
DEBUG = True | ||
TEMPLATE_DEBUG = True | ||
INSTALLED_APPS += ('debug_toolbar',) | ||
DEPLOYMENT = False | ||
|
||
|
||
MEDIA_ROOT = os.path.join(BASE_DIR, 'resources') | ||
PROJECT_PATH = os.path.join(MEDIA_ROOT, "projects") | ||
|
||
VIRTUAL_HOST = os.environ.get('VIRTUAL_HOST', 'localhost') | ||
PROTOCOL = os.environ.get('HTTP_PROTOCOL', 'http') | ||
|
||
REST_FRAMEWORK = { | ||
'DEFAULT_AUTHENTICATION_CLASSES': ( | ||
'rest_framework.authentication.SessionAuthentication', | ||
), | ||
'DEFAULT_PERMISSION_CLASSES': ( | ||
'rest_framework.permissions.AllowAny', | ||
), | ||
'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',) | ||
} | ||
|
||
# ddt is treated as an external service for now | ||
|
||
EXTERNAL_APP_LOCATIONS = { | ||
'bokeh-server': '/bokeh', | ||
'ddt': PROTOCOL + '://' + VIRTUAL_HOST + ':8084', | ||
'tad': '/tad', | ||
'kibana': '/kibana', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
server { | ||
listen 80; | ||
server_name explorer.continuum.io; | ||
|
||
client_max_body_size 100M; | ||
|
||
location / { | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header Host $host; | ||
#todo: make this a variable below | ||
proxy_pass http://127.0.0.1:8000; | ||
} | ||
|
||
location /kibana/ { | ||
rewrite /kibana/(.*) /$1 break; | ||
proxy_pass http://127.0.0.1:5601/; | ||
proxy_redirect off; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /bokeh/ { | ||
proxy_pass http://127.0.0.1:5006/; | ||
proxy_cache off; | ||
proxy_cookie_domain localhost explorer.continuum.io; | ||
sub_filter 'http://localhost:5006' 'https://explorer.continuum.io'; | ||
} | ||
|
||
location /bokeh/sub { | ||
proxy_pass http://localhost:5006; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
} | ||
|
||
location /static { | ||
rewrite ^/static/(.*)$ /$1 break; | ||
root /home/explorer/memex-explorer/source/base/static/ ; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.