Authored by 陈峰

commit

  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
  10 +FROM ccr.ccs.tencentyun.com/yoho-base/nodejs
  11 +
  12 +MAINTAINER feng.chen <feng.chen@yoho.cn>
  13 +
  14 +ENV NODE_ENV=production \
  15 + NODE_HOME=/home
  16 +
  17 +COPY yohoblk-wap.tar.gz /home
  18 +
  19 +WORKDIR /home
  20 +
  21 +RUN tar -xzvf yohoblk-wap.tar.gz && \
  22 + rm -f yohoblk-wap.tar.gz
  23 +
  24 +#expose port
  25 +EXPOSE 6004
  26 +
  27 +CMD ["node","/home/yohoblk-wap/app.js"]
@@ -109,6 +109,10 @@ try { @@ -109,6 +109,10 @@ try {
109 109
110 require('./dispatch')(app); 110 require('./dispatch')(app);
111 111
  112 + app.use('/crm/common/ok.jsp', (req, res) => {
  113 + res.status(204).end();
  114 + });
  115 +
112 app.all('*', errorHanlder.notFound()); // 404 116 app.all('*', errorHanlder.notFound()); // 404
113 117
114 // YOHO 后置中间件 118 // YOHO 后置中间件
  1 +rm -rf yohoblk-wap.tar.gz
  2 +yarn
  3 +if [[ $1 == "TEST1" ]] || [[ $1 == "TEST2" ]] || [[ $1 == "TEST3" ]]
  4 +then
  5 +yarn build
  6 +fi
  7 +tar -czvf yohoblk-wap.tar.gz *