Merge branch 'gray' into 'master'
Gray See merge request !92
Showing
5 changed files
with
57 additions
and
7 deletions
Dockerfile
0 → 100644
1 | +############################################################ | ||
2 | +# Dockerfile to build hystrix + turbin Installed Containers | ||
3 | +# Based on centos 6.7 | ||
4 | +# How to build new image: docker build -t yoho-hystrix-qcloud . | ||
5 | +# the hystrix alert need to post events to influxdb.yohoops.org. | ||
6 | +# nginx version: 1.12.0 | ||
7 | +############################################################ | ||
8 | + | ||
9 | +#base image : ccr.ccs.tencentyun.com/yoho-base/nodejs:8.9.1 | ||
10 | +FROM ccr.ccs.tencentyun.com/yoho-base/nodejs:8.9.1 | ||
11 | + | ||
12 | +MAINTAINER feng.chen <feng.chen@yoho.cn> | ||
13 | + | ||
14 | +ENV NODE_ENV=production \ | ||
15 | + NODE_HOME=/home | ||
16 | + | ||
17 | +COPY yoho-shop-manage.tar.gz /home | ||
18 | + | ||
19 | +RUN cd /home && \ | ||
20 | + mkdir -p /home/yoho-shop-manage && \ | ||
21 | + mkdir -p /Data/log/yoho-shop-manage && \ | ||
22 | + tar -xzf yoho-shop-manage.tar.gz -C /home/yoho-shop-manage && \ | ||
23 | + rm -rf yoho-shop-manage.tar.gz | ||
24 | + | ||
25 | +WORKDIR /home/yoho-shop-manage | ||
26 | + | ||
27 | +#expose port | ||
28 | +EXPOSE 6007 | ||
29 | + | ||
30 | +CMD ["node","/home/yoho-shop-manage/server/app.js"] |
docker.sh
0 → 100644
@@ -56,6 +56,10 @@ app.use(multipartMiddleware); | @@ -56,6 +56,10 @@ app.use(multipartMiddleware); | ||
56 | const middleware = require('./middleware'); | 56 | const middleware = require('./middleware'); |
57 | const controllers = require('./controllers'); | 57 | const controllers = require('./controllers'); |
58 | 58 | ||
59 | +app.use('/crm/common/ok.jsp', (req, res) => { | ||
60 | + res.status(204).end(); | ||
61 | +}); | ||
62 | + | ||
59 | try { | 63 | try { |
60 | app.use(middleware.main); | 64 | app.use(middleware.main); |
61 | 65 |
@@ -146,7 +146,7 @@ if (global.env.Test) { | @@ -146,7 +146,7 @@ if (global.env.Test) { | ||
146 | if (global.env.Production) { | 146 | if (global.env.Production) { |
147 | domains.erp = 'http://gateway.erp.yohoops.org'; | 147 | domains.erp = 'http://gateway.erp.yohoops.org'; |
148 | domains.platform = 'http://api.platform.yohoops.org/platform'; | 148 | domains.platform = 'http://api.platform.yohoops.org/platform'; |
149 | - domains.shop = 'http://127.0.0.1:30016'; | 149 | + domains.shop = 'http://10.66.50.140:30016'; |
150 | } | 150 | } |
151 | 151 | ||
152 | _.each(domainApis, (apis, domainName) => { | 152 | _.each(domainApis, (apis, domainName) => { |
@@ -20,20 +20,26 @@ const config = { | @@ -20,20 +20,26 @@ const config = { | ||
20 | apiDomain: apiDomain, | 20 | apiDomain: apiDomain, |
21 | loggers: { | 21 | loggers: { |
22 | infoFile: { | 22 | infoFile: { |
23 | - close: true, | ||
24 | name: 'info', | 23 | name: 'info', |
25 | - level: 'error', | ||
26 | - filename: 'logs/info.log', | ||
27 | - maxFiles: 7 | 24 | + level: 'info', |
25 | + filename: '/Data/logs/yoho-shop-manage/info.log', | ||
26 | + maxFiles: 7, | ||
27 | + timestamp() { | ||
28 | + return new Date().toString(); | ||
29 | + } | ||
28 | }, | 30 | }, |
29 | errorFile: { | 31 | errorFile: { |
30 | name: 'error', | 32 | name: 'error', |
31 | level: 'error', | 33 | level: 'error', |
32 | - filename: 'logs/error.log', | 34 | + filename: '/Data/logs/yoho-shop-manage/error.log', |
33 | handleExceptions: true, | 35 | handleExceptions: true, |
34 | - maxFiles: 7 | 36 | + maxFiles: 7, |
37 | + timestamp() { | ||
38 | + return new Date().toString(); | ||
39 | + } | ||
35 | }, | 40 | }, |
36 | console: { | 41 | console: { |
42 | + close: true, | ||
37 | level: 'info', | 43 | level: 'info', |
38 | colorize: 'all', | 44 | colorize: 'all', |
39 | prettyPrint: true | 45 | prettyPrint: true |
-
Please register or login to post a comment