Authored by 陈峰

commit

... ... @@ -16,13 +16,13 @@ ENV NODE_ENV=production \
NODE_HOME=/home
RUN cd /home && \
mkdir -p /home/yoho-app
mkdir -p /home/yoho-app-web
COPY . /home/yoho-app
COPY . /home/yoho-app-web
WORKDIR /home/yoho-app
WORKDIR /home/yoho-app-web
#expose port
EXPOSE 6001
CMD ["node","/home/yoho-app/app.js"]
CMD ["node","/home/yoho-app-web/app.js"]
... ...
... ... @@ -14,7 +14,7 @@ const catchError = (err, message, context) => {
sender.addMessage({
measurement: 'error-report',
tags: {
app: 'yoho-app', // 应用名称
app: 'yoho-app-web', // 应用名称
hostname: context.hostname,
type: 'server',
route: context.route, // 请求路由
... ...
... ... @@ -14,7 +14,7 @@ const webpackConfig = {
filename: 'static/js/[name].[chunkhash].js',
path: distDir,
chunkFilename: 'static/js/[name].[chunkhash].js',
publicPath: isProd ? '//cdn.yoho.cn/yoho-app/' : '/'
publicPath: isProd ? '//cdn.yoho.cn/yoho-app-web/' : '/'
},
resolve: {
extensions: ['.js', '.vue', '.json'],
... ...
{
"name": "yoho-app",
"name": "yoho-app-web",
"version": "1.0.1",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
"type": "git",
"url": "http://git.yoho.cn/fe/yoho-app.git"
"url": "http://git.yoho.cn/fe/yoho-app-web.git"
},
"scripts": {
"start": "NODE_ENV=production node app.js",
... ...
{
"apps": [
{
"name": "yoho-app",
"name": "yoho-app-web",
"script": "app.js",
"instances": "1",
"exec_mode": "cluster",
"wait_ready": true,
"merge_logs": true,
"log_date_format": "YYYY-MM-DD HH:mm:ss Z",
"error_file": "/Data/logs/node/yoho-app-node-err.log",
"out_file": "/Data/logs/node/yoho-app-node-out.log",
"error_file": "/Data/logs/node/yoho-app-web-err.log",
"out_file": "/Data/logs/node/yoho-app-web-out.log",
"env": {
"TZ": "Asia/Shanghai",
"PORT": 6001
... ...