From d54a98430ed012ecdadf0307262d5855712063d7 Mon Sep 17 00:00:00 2001 From: letgogo Date: Tue, 27 Jun 2017 13:37:29 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E7=9A=84=E8=B7=AF=E5=BE=84=E5=A4=AA=E5=A4=9A=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E7=9F=A5=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83=E6=97=B6=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E5=9C=A8=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=B8=8A=E6=98=AF?= =?UTF-8?q?=E5=A6=82=E4=BD=95=E6=89=B9=E9=87=8F=E6=9B=BF=E6=8D=A2=E7=9A=84?= =?UTF-8?q?=EF=BC=8C=E6=9C=AC=E6=AC=A1=E7=BB=9F=E4=B8=80=E6=8A=BD=E5=8F=96?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- talk-account/client/controllers/index.coffee | 2 ++ talk-account/config/default.coffee | 20 ++++++++-------- talk-api2x/config/default.coffee | 24 +++++++++++--------- talk-snapper/config/default.coffee | 4 ++-- talk-web/config/default.coffee | 24 +++++++++++--------- 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/talk-account/client/controllers/index.coffee b/talk-account/client/controllers/index.coffee index 1ac3ece..0c573e9 100644 --- a/talk-account/client/controllers/index.coffee +++ b/talk-account/client/controllers/index.coffee @@ -4,6 +4,8 @@ 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..0a1dde6 100644 --- a/talk-account/config/default.coffee +++ b/talk-account/config/default.coffee @@ -1,5 +1,7 @@ countries = require './util/countries' +domain_str = "wx.hoootools.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..63efd92 100644 --- a/talk-api2x/config/default.coffee +++ b/talk-api2x/config/default.coffee @@ -1,32 +1,34 @@ path = require 'path' +domain_str = "wx.hoootools.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..441ffb1 100644 --- a/talk-snapper/config/default.coffee +++ b/talk-snapper/config/default.coffee @@ -3,6 +3,6 @@ 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..2dfc599 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 = "wx.hoootools.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 From e8ade007503950cf71a458a5a3b6b34107f599a3 Mon Sep 17 00:00:00 2001 From: letgogo Date: Tue, 27 Jun 2017 13:40:55 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BD=BF=E7=94=A8email=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E6=8A=A5=E9=94=99=EF=BC=8C=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A4=E5=A4=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- talk-account/client/controllers/index.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/talk-account/client/controllers/index.coffee b/talk-account/client/controllers/index.coffee index 0c573e9..69b6764 100644 --- a/talk-account/client/controllers/index.coffee +++ b/talk-account/client/controllers/index.coffee @@ -3,7 +3,6 @@ recorder = require 'actions-recorder' if typeof window isnt 'undefined' cookie = require 'cookie_js' - cookie = cookie.cookie; config = require '../config' From 10968d45583cb66b4727730af4ab37b945f94870 Mon Sep 17 00:00:00 2001 From: letgogo Date: Tue, 27 Jun 2017 13:43:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=9C=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=AD=E5=B0=91=E9=87=8F=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- talk-account/config/default.coffee | 2 +- talk-api2x/config/default.coffee | 2 +- talk-web/config/default.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/talk-account/config/default.coffee b/talk-account/config/default.coffee index 0a1dde6..4febe58 100644 --- a/talk-account/config/default.coffee +++ b/talk-account/config/default.coffee @@ -1,6 +1,6 @@ countries = require './util/countries' -domain_str = "wx.hoootools.com"; +domain_str = "abc.test.com"; module.exports = env: 'static' diff --git a/talk-api2x/config/default.coffee b/talk-api2x/config/default.coffee index 63efd92..024448b 100644 --- a/talk-api2x/config/default.coffee +++ b/talk-api2x/config/default.coffee @@ -1,6 +1,6 @@ path = require 'path' -domain_str = "wx.hoootools.com"; +domain_str = "abc.test.com"; module.exports = config = debug: true diff --git a/talk-web/config/default.coffee b/talk-web/config/default.coffee index 2dfc599..52a795b 100644 --- a/talk-web/config/default.coffee +++ b/talk-web/config/default.coffee @@ -1,7 +1,7 @@ isGuest = process.env.APP is 'guest' -domain_str = "wx.hoootools.com"; +domain_str = "abc.test.com"; module.exports = env: 'static', From b0511bc122a89925bfa40f3e07fc5e4cff15e19e Mon Sep 17 00:00:00 2001 From: letgogo Date: Tue, 27 Jun 2017 13:46:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=9C=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E4=B8=AD=E5=B0=91=E9=87=8F=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- talk-snapper/config/default.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/talk-snapper/config/default.coffee b/talk-snapper/config/default.coffee index 441ffb1..5bde58b 100644 --- a/talk-snapper/config/default.coffee +++ b/talk-snapper/config/default.coffee @@ -6,3 +6,4 @@ module.exports = pub: [6379, "10.10.10.1"] sub: [6379, "10.10.10.1"] channelPrefix: 'snapper' +