From ae8065ee996f14451ef59abe57dc7712940be171 Mon Sep 17 00:00:00 2001 From: Luc Claustres Date: Wed, 10 Apr 2024 12:57:15 +0200 Subject: [PATCH] wip: Refactor CI to use GitHub actions and generic bash scripts (#77) --- .dockerignore | 1 - build/webpack.prod.conf.js | 4 ++-- dockerfile.dev | 13 +++++-------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.dockerignore b/.dockerignore index c63696a..5fc015d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,5 +3,4 @@ dist electron/dist node_modules electron/node_modules -node_modules diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index b254c86..c91aae0 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -58,7 +58,7 @@ var webpackConfig = merge(baseWebpackConfig, { }) ] }) - +/* FIXME: Uglify return an error if (!process.env.DEBUG) { webpackConfig.plugins.unshift( new webpack.optimize.UglifyJsPlugin({ @@ -70,7 +70,7 @@ if (!process.env.DEBUG) { }) ) } - +*/ if (config.build.productionGzip) { var CompressionWebpackPlugin = require('compression-webpack-plugin') diff --git a/dockerfile.dev b/dockerfile.dev index 34d6358..fa33461 100644 --- a/dockerfile.dev +++ b/dockerfile.dev @@ -1,12 +1,9 @@ -FROM weacast/weacast-api:dev +FROM node:16-bookworm AS Build -WORKDIR /opt/weacast/weacast-app -COPY . /opt/weacast/weacast-app +WORKDIR /opt/weacast -RUN yarn install -# Install already performs build -# RUN npm run build +RUN git clone https://github.com/weacast/weacast-app.git -b master --single-branch && cd weacast-app && yarn install && cd .. -RUN cp -R /opt/weacast/weacast-app/dist /opt/weacast/weacast-api +FROM weacast/weacast-api:dev -WORKDIR /opt/weacast/weacast-api +COPY --from=Build --chown=node:node /opt/weacast/weacast-app/dist /opt/weacast/weacast/packages/api/dist