Authored by 郝肖肖

'docker'

... ... @@ -4,4 +4,6 @@ node_modules/
*.log
.eslintcache
.stylelintcache
.vscode/
\ No newline at end of file
.vscode/
*.tar.gz
... ...
############################################################
# Dockerfile to build hystrix + turbin Installed Containers
# Based on centos 6.7
# How to build new image: docker build -t yoho-hystrix-qcloud .
# the hystrix alert need to post events to influxdb.yohoops.org.
# nginx version: 1.12.0
############################################################
#base image : ccr.ccs.tencentyun.com/yoho-base/nodejs
FROM ccr.ccs.tencentyun.com/yoho-base/nodejs
MAINTAINER xiaoxiao.hao <xiaoxiao.hao@yoho.cn>
ENV NODE_ENV=production \
NODE_HOME=/home
# COPY turbine configuration files
COPY yoho-yohobuy-apm.tar.gz /home
RUN cd /home && \
mkdir -p /home/yoho-yohobuy-apm && \
tar -xzvf yoho-yohobuy-apm.tar.gz -C /home/yoho-yohobuy-apm && \
rm -rf yoho-yohobuy-apm.tar.gz
WORKDIR /home/yoho-yohobuy-apm
#expose port
EXPOSE 6009
CMD ["node","/home/yoho-yohobuy-apm/app.js"]
... ...
... ... @@ -18,17 +18,15 @@ module.exports = {
domains: [/yohobuy\.com^/],
loggers: {
infoFile: {
close: true,
name: 'info',
level: 'error',
filename: 'logs/info.log',
level: 'info',
filename: '/Data/log/yoho-yohobuy-apm/info.log',
maxFiles: 7
},
errorFile: {
close: true,
name: 'error',
level: 'error',
filename: 'logs/error.log',
filename: '/Data/log/yoho-yohobuy-apm/error.log',
handleExceptions: true,
maxFiles: 7
},
... ...
#!/bin/bash
wordir=$2
cd $wordir
rm -rf yoho-yohobuy-apm.tar.gz
yarn
tar -czvf yoho-yohobuy-apm.tar.gz *
... ...