diff --git a/Dockerfile b/Dockerfile index 3f8c157..366e1be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,10 @@ RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error COPY priv priv COPY assets assets +COPY lib lib RUN npm run --prefix ./assets deploy RUN mix phx.digest -# compile and build release -COPY lib lib # uncomment COPY if rel/ exists # COPY rel rel RUN mix do compile, release diff --git a/assets/package.json b/assets/package.json index 03733a4..5157220 100644 --- a/assets/package.json +++ b/assets/package.json @@ -3,7 +3,7 @@ "description": " ", "license": "MIT", "scripts": { - "deploy": "webpack --mode production", + "deploy": "NODE_ENV=production webpack --mode production", "watch": "webpack --mode development --watch" }, "dependencies": { diff --git a/assets/static/favicon.ico b/assets/static/favicon.ico index c3cea49..f247220 100644 Binary files a/assets/static/favicon.ico and b/assets/static/favicon.ico differ diff --git a/assets/webpack.config.js b/assets/webpack.config.js index b0007c6..a7bee73 100644 --- a/assets/webpack.config.js +++ b/assets/webpack.config.js @@ -9,6 +9,10 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = (env, options) => { const devMode = options.mode !== 'production'; + const PATHS = { + src: path.join(__dirname, '../') + } + return { optimization: { minimizer: [ @@ -47,7 +51,7 @@ module.exports = (env, options) => { }, plugins: [ new MiniCssExtractPlugin({ filename: '../css/app.css' }), - new CopyWebpackPlugin([{ from: 'static/', to: '../' }]) + new CopyWebpackPlugin([{ from: 'static/', to: '../' }]), ] .concat(devMode ? [new HardSourceWebpackPlugin()] : []) }