Commit 85e9b0d3 authored by zkuang's avatar zkuang

adapt deployment changes

parent aebd66e2
.*~
venv
*.pyc
__pycache__/
instance/
.pytest_cache/
.coverage
htmlcov/
dist/
build/
*.egg-info/
.~*
carbinet-admin-web.bak/
carbinet.sh
dump.rdb
.DS_Store
......@@ -23,9 +23,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '1gboig1)_)ljuz_h0&8m%s84ybxz4*z!w0pu$0qi#mobo#poae'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['sso.gzego.com']
# Application definition
......@@ -76,8 +76,12 @@ WSGI_APPLICATION = 'account.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.mysql',
'NAME': 'sso',
'USER': 'cas',
'PASSWORD': '123456',
'HOST': 'mysql', # Or an IP Address that your DB is hosted on
'PORT': '3306',
}
}
......@@ -120,23 +124,19 @@ USE_TZ = True
STATIC_URL = '/static/'
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MAMA_CAS_ENABLE_SINGLE_SIGN_OUT = True
MAMA_CAS_SERVICES = [
{
'SERVICE': 'http://localhost:8100',
'CALLBACKS': [
'mama_cas.callbacks.user_name_attributes',
],
'LOGOUT_ALLOW': True,
'LOGOUT_URL': 'http://localhost:8100/accounts/callback',
},
{
'SERVICE': 'http://localhost:5000/api/cas',
'SERVICE': 'http://carbinet.gzego.com:8080/api/cas',
'CALLBACKS': [
'mama_cas.callbacks.user_model_attributes',
],
'LOGOUT_ALLOW': True,
'LOGOUT_URL': 'http://localhost:5000/api/cas/logout',
'LOGOUT_URL': 'http://carbinet.gzego.com:8080/api/cas/logout',
},
]
\ No newline at end of file
......@@ -15,9 +15,12 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = [
path('admin/', admin.site.urls),
path(r'', include('mama_cas.urls')),
]
urlpatterns += staticfiles_urlpatterns()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment