WIP
This commit is contained in:
parent
d0777e2b85
commit
b02d3db684
41 changed files with 426 additions and 647 deletions
|
@ -1,41 +1,41 @@
|
|||
import socket
|
||||
import os
|
||||
import json
|
||||
from urlparse import urlparse
|
||||
|
||||
HOSTNAME = socket.gethostname()
|
||||
ENV = 'DEV'
|
||||
|
||||
if HOSTNAME.startswith('lsn-'):
|
||||
ENV = 'PROD'
|
||||
else:
|
||||
ENV = 'DEV'
|
||||
DEBUG = True
|
||||
ASSETS_DEBUG = True
|
||||
|
||||
SQLALCHEMY_DATABASE_URI = 'postgresql://deploy:dbpassword@localhost:5432/realms'
|
||||
PORT = 80
|
||||
BASE_URL = 'http://realms.dev'
|
||||
|
||||
REDIS_HOST = '127.0.0.1'
|
||||
REDIS_PORT = 6379
|
||||
REDIS_DB = '0'
|
||||
|
||||
SECRET_KEY = 'K3dRq1q9eN72GJDkgvyshFVwlqHHCyPI'
|
||||
SECRET = 'K3dRq1q9eN72GJDkgvyshFVwlqHHCyPI'
|
||||
|
||||
REPO_DIR = '/home/deploy/repos'
|
||||
REPO_MAIN_NAME = '_'
|
||||
REPO_FORBIDDEN_NAMES = ['api', 'www']
|
||||
REPO_ENABLE_SUBDOMAIN = True
|
||||
|
||||
RECAPTCHA_PUBLIC_KEY = '6LfoxeESAAAAAGNaeWnISh0GTgDk0fBnr6Bo2Tfk'
|
||||
RECAPTCHA_PRIVATE_KEY = '6LfoxeESAAAAABFzdCs0hNIIyeb42mofV-Ndd2_2'
|
||||
RECAPTCHA_OPTIONS = {'theme': 'clean'}
|
||||
|
||||
ROOT_ENDPOINT = 'wiki.page'
|
||||
WIKI_PATH = '/home/deploy/wiki'
|
||||
WIKI_HOME = 'home'
|
||||
|
||||
MODULES = [
|
||||
'wiki',
|
||||
'auth'
|
||||
]
|
||||
ALLOW_ANON = True
|
||||
|
||||
if ENV is 'PROD':
|
||||
PORT = 80
|
||||
DOMAIN = 'realms.io'
|
||||
else:
|
||||
DEBUG = True
|
||||
ASSETS_DEBUG = True
|
||||
DOMAIN = 'realms.dev'
|
||||
PORT = 8000
|
||||
ROOT_ENDPOINT = 'wiki.page'
|
||||
|
||||
with open(os.path.join(os.path.dirname(__file__) + "/../../", 'config.json')) as f:
|
||||
__settings = json.load(f)
|
||||
globals().update(__settings)
|
||||
|
||||
# String trailing slash
|
||||
if BASE_URL.endswith('/'):
|
||||
BASE_URL = BASE_URL[-1]
|
||||
|
||||
_url = urlparse(BASE_URL)
|
||||
RELATIVE_PATH = _url.path
|
||||
|
||||
if ENV != "DEV":
|
||||
DEBUG = False
|
||||
ASSETS_DEBUG = False
|
||||
|
||||
MODULES = ['wiki', 'auth']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue