diff --git a/Dockerfile b/Dockerfile index 4c85e24..e2c0b64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ WORKDIR /srv/build VOLUME ["/srv/build/repo/incoming"] -ENTRYPOINT ["./main.sh"] +ENTRYPOINT ["./main.sh", "master"] diff --git a/launch.sh b/launch.sh old mode 100644 new mode 100755 diff --git a/src/build.npm.sh b/src/build.npm.sh new file mode 100755 index 0000000..47e6f74 --- /dev/null +++ b/src/build.npm.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +apt-get update +apt-get -qq -y --no-install-recommends install curl jq ca-certificates git g++ gcc make clang wget xz-utils python3 sudo +mkdir build_node +cd build_node/ || exit +wget https://nodejs.org/dist/v16.9.1/node-v16.9.1.tar.xz +tar xf node-v16.9.1.tar.xz +mv node-v16.9.1 node +cd node || exit +./configure +make -j4 +make install +node --version diff --git a/src/build.sh b/src/build.sh index c935040..7e56999 100755 --- a/src/build.sh +++ b/src/build.sh @@ -2,14 +2,25 @@ set -e +#echo "Installing build dependencies (third party)..." +#./install.npm.thirdparty.sh + +echo "Installing build dependencies (npm official source)..." +./build.npm.sh + cd project -echo "Installing build dependencies (apt)..." -apt-get -qq -y --no-install-recommends install npm cargo > /dev/null +#echo "Installing build dependencies (apt)..." +#apt-get -qq -y --no-install-recommends install npm cargo > /dev/null + echo "Installing build dependencies (npm)..." npm install echo "Build dependencies installed." +echo "Installing packaging dependencies..." +apt-get -qq -y --no-install-recommends install binutils > /dev/null +echo "Packaging dependencies installed." + echo "Building the app..." NODE_ENV=production npm run build NO_ASAR=true npm run pack:generate_config diff --git a/src/install.npm.thirdparty.sh b/src/install.npm.thirdparty.sh new file mode 100755 index 0000000..82c4cf7 --- /dev/null +++ b/src/install.npm.thirdparty.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +apt-get update +apt-get -qq -y --no-install-recommends install curl wget ca-certificates sudo + +curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - + +apt-get -qq -y install nodejs + +node --version