Authored by 郝肖肖

'docker'

@@ -5,3 +5,5 @@ node_modules/ @@ -5,3 +5,5 @@ node_modules/
5 .eslintcache 5 .eslintcache
6 .stylelintcache 6 .stylelintcache
7 .vscode/ 7 .vscode/
  8 +
  9 +*.tar.gz
  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 xiaoxiao.hao <xiaoxiao.hao@yoho.cn>
  13 +
  14 +ENV NODE_ENV=production \
  15 + NODE_HOME=/home
  16 +
  17 +# COPY turbine configuration files
  18 +COPY yoho-yohobuy-apm.tar.gz /home
  19 +
  20 +RUN cd /home && \
  21 + mkdir -p /home/yoho-yohobuy-apm && \
  22 + tar -xzvf yoho-yohobuy-apm.tar.gz -C /home/yoho-yohobuy-apm && \
  23 + rm -rf yoho-yohobuy-apm.tar.gz
  24 +
  25 +WORKDIR /home/yoho-yohobuy-apm
  26 +
  27 +#expose port
  28 +EXPOSE 6009
  29 +
  30 +CMD ["node","/home/yoho-yohobuy-apm/app.js"]
@@ -18,17 +18,15 @@ module.exports = { @@ -18,17 +18,15 @@ module.exports = {
18 domains: [/yohobuy\.com^/], 18 domains: [/yohobuy\.com^/],
19 loggers: { 19 loggers: {
20 infoFile: { 20 infoFile: {
21 - close: true,  
22 name: 'info', 21 name: 'info',
23 - level: 'error',  
24 - filename: 'logs/info.log', 22 + level: 'info',
  23 + filename: '/Data/log/yoho-yohobuy-apm/info.log',
25 maxFiles: 7 24 maxFiles: 7
26 }, 25 },
27 errorFile: { 26 errorFile: {
28 - close: true,  
29 name: 'error', 27 name: 'error',
30 level: 'error', 28 level: 'error',
31 - filename: 'logs/error.log', 29 + filename: '/Data/log/yoho-yohobuy-apm/error.log',
32 handleExceptions: true, 30 handleExceptions: true,
33 maxFiles: 7 31 maxFiles: 7
34 }, 32 },
  1 +#!/bin/bash
  2 +wordir=$2
  3 +cd $wordir
  4 +rm -rf yoho-yohobuy-apm.tar.gz
  5 +yarn
  6 +tar -czvf yoho-yohobuy-apm.tar.gz *