fix docker build

This commit is contained in:
lesion
2019-03-24 17:12:41 +01:00
parent 5f15fa9557
commit af5d96db90
3 changed files with 6 additions and 4 deletions

View File

@@ -3,8 +3,10 @@ FROM node:10
WORKDIR /usr/src/app
COPY package.json .
COPY pm2.json .
COPY .env.production .
# install backend dependencies
RUN yarn
@@ -22,7 +24,7 @@ WORKDIR /usr/src/app/client
RUN yarn
# build frontend
RUN yarn build
RUN export $(cat /usr/src/app/.env.production); yarn build
WORKDIR /usr/src/app

View File

@@ -8,7 +8,7 @@ module.exports = {
publicPath: process.env.BASE_URL,
configureWebpack: {
plugins: [
new webpack.NormalModuleReplacementPlugin(/element-ui[\/\\]lib[\/\\]locale[\/\\]lang[\/\\]zh-CN/, 'element-ui/lib/locale/lang/en')
new webpack.NormalModuleReplacementPlugin(/element-ui[/\\]lib[/\\]locale[/\\]lang[/\\]zh-CN/, 'element-ui/lib/locale/lang/en')
]
},
devServer: {
@@ -16,6 +16,6 @@ module.exports = {
},
transpileDependencies: [
/\bvue-awesome\b/,
'vuex-persist',
'vuex-persist'
]
}