diff --git a/talk-account/client/controllers/index.coffee b/talk-account/client/controllers/index.coffee index 1ac3ece..69b6764 100644 --- a/talk-account/client/controllers/index.coffee +++ b/talk-account/client/controllers/index.coffee @@ -3,6 +3,7 @@ recorder = require 'actions-recorder' if typeof window isnt 'undefined' cookie = require 'cookie_js' + cookie = cookie.cookie; config = require '../config' actions = require '../actions' diff --git a/talk-account/config/default.coffee b/talk-account/config/default.coffee index fbb1e91..4febe58 100644 --- a/talk-account/config/default.coffee +++ b/talk-account/config/default.coffee @@ -1,5 +1,7 @@ countries = require './util/countries' +domain_str = "abc.test.com"; + module.exports = env: 'static' debug: true @@ -8,16 +10,16 @@ module.exports = webpackDevPort: 8011 useCDN: no checkToken: 'Check token for heartbeat' - resourceDomain: 'http://localhost:7001/account' + resourceDomain: "http://#{domain_str}/account" useAnalytics: no # URL - accountUrl: 'http://localhost:7001/account' - siteUrl: 'http://localhost:7001' - weiboLogin: "http://localhost:7001/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/weibo/landing'}", - firimLogin: "http://localhost:7001/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/firim/landing'}", - githubLogin: "http://localhost:7001/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://localhost:7001/v2/github/landing'}", - trelloLogin: "http://localhost:7001/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/trello/landing'}", - teambitionLogin: "http://localhost:7001/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/teambtion/landing'}", + accountUrl: "http://#{domain_str}/account" + siteUrl: "http://#{domain_str}" + weiboLogin: "http://#{domain_str}/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/weibo/landing'}", + firimLogin: "http://#{domain_str}/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/firim/landing'}", + githubLogin: "http://#{domain_str}/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/github/landing'}", + trelloLogin: "http://#{domain_str}/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/trello/landing'}", + teambitionLogin: "http://#{domain_str}/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/teambtion/landing'}", # Cookies cookieDomain: '.localhost' accountCookieId: 'aid' @@ -27,7 +29,7 @@ module.exports = mongo: address: 'mongodb://localhost:27017/talk_account' redis: - host: 'localhost' + host: '10.10.10.1' # Client client: countries: countries diff --git a/talk-api2x/config/default.coffee b/talk-api2x/config/default.coffee index 6c6bbec..024448b 100644 --- a/talk-api2x/config/default.coffee +++ b/talk-api2x/config/default.coffee @@ -1,32 +1,34 @@ path = require 'path' +domain_str = "abc.test.com"; + module.exports = config = debug: true - apiHost: 'localhost:7001' + apiHost: domain_str accountId: 'aid' apiVersion: 'v2' - webHost: 'localhost:7001' + webHost: domain_str sessionDomain: '.localhost' - guestHost: 'localhost:7001' + guestHost: domain_str schema: 'http' mongodb: 'mongodb://localhost:27017/talk' - redisHost: 'localhost' + redisHost: '10.10.10.1' redisPort: 6379 redisDb: 0 snapper: - pub: [6379, 'localhost'] + pub: [6379, '10.10.10.1'] clientId: 'Client id of snapper' clientSecret: 'Client secret of snapper' channelPrefix: 'snapper' - host: 'localhost:7001/snapper' # For test - talkAccountApiUrl: 'http://localhost:7001/account' - talkAccountPageUrl: 'http://localhost:7001/page' + host: "#{domain_str}/snapper" # For test + talkAccountApiUrl: "http://#{domain_str}/account" + talkAccountPageUrl: "http://#{domain_str}/page" cdnPrefix: 'https://dn-talk.oss.aliyuncs.com' checkToken: 'Check token for heartbeat statement' serviceConfig: - apiHost: 'http://localhost:7001/v2' - cdnPrefix: "http://localhost:7001/v2/services-static" - talkAccountApiUrl: 'http://localhost:7001/account' + apiHost: "http://#{domain_str}/v2" + cdnPrefix: "http://#{domain_str}/v2/services-static" + talkAccountApiUrl: "http://#{domain_str}/account" teambition: clientSecret: 'Your teambition application secret' host: 'https://www.teambition.com' diff --git a/talk-snapper/config/default.coffee b/talk-snapper/config/default.coffee index 55d150f..5bde58b 100644 --- a/talk-snapper/config/default.coffee +++ b/talk-snapper/config/default.coffee @@ -3,6 +3,7 @@ module.exports = port: process.env.PORT or 7001 prefix: '/snapper/socket' # Configure redis pub/sub instance and channel prefix - pub: [6379, "localhost"] - sub: [6379, "localhost"] + pub: [6379, "10.10.10.1"] + sub: [6379, "10.10.10.1"] channelPrefix: 'snapper' + diff --git a/talk-web/config/default.coffee b/talk-web/config/default.coffee index a609be5..52a795b 100644 --- a/talk-web/config/default.coffee +++ b/talk-web/config/default.coffee @@ -1,27 +1,29 @@ isGuest = process.env.APP is 'guest' +domain_str = "abc.test.com"; + module.exports = env: 'static', isGuest: isGuest version: require('../package.json').version apiHost: if isGuest then '/api' else '/v2' - sockHost: 'http://localhost:7001/snapper', + sockHost: "http://#{domain_str}/snapper", inteUrl: 'http://account.project.ci', - accountUrl: 'http://localhost:7001/account', + accountUrl: "http://#{domain_str}/account", domainUrl: 'http://localhost:8081', uploadUrl: 'https://striker.teambition.net', cookieDomain: '.localhost' pdfStaticHost: 'http://dn-static.oss.aliyuncs.com/pdf-viewer/v0.3.0/index.html', - loginUrl: 'http://localhost:7001/account', - logoutUrl: 'http://localhost:7001/account', - weiboLogin: "http://localhost:7001/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/weibo/landing'}", - firimLogin: "http://localhost:7001/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/firim/landing'}", - githubLogin: "http://localhost:7001/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/github/landing'}", - trelloLogin: "http://localhost:7001/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/trello/landing'}", - teambitionLogin: "http://localhost:7001/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/teambtion/landing'}", - feedbackUrl: 'http://localhost:7001/v2/services/webhook/4d76d92134e727620fce35d7d7c5b1c43921101e' - windowOnErrorUrl: 'http://localhost:7001/v2/services/webhook/14b30bc73f75044e7500721dee5e985e58049382' + loginUrl: "http://#{domain_str}/account", + logoutUrl: "http://#{domain_str}/account", + weiboLogin: "http://#{domain_str}/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/weibo/landing'}", + firimLogin: "http://#{domain_str}/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/firim/landing'}", + githubLogin: "http://#{domain_str}/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/github/landing'}", + trelloLogin: "http://#{domain_str}/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/trello/landing'}", + teambitionLogin: "http://#{domain_str}/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/teambtion/landing'}", + feedbackUrl: "http://#{domain_str}/v2/services/webhook/4d76d92134e727620fce35d7d7c5b1c43921101e" + windowOnErrorUrl: "http://#{domain_str}/v2/services/webhook/14b30bc73f75044e7500721dee5e985e58049382" webpackDevPort: 8081, cdn: 'https://dn-st.b0.upaiyun.com' isMinified: no