diff --git a/build/frappe-nginx/Dockerfile b/build/frappe-nginx/Dockerfile index d360f87f..191d72bf 100644 --- a/build/frappe-nginx/Dockerfile +++ b/build/frappe-nginx/Dockerfile @@ -25,8 +25,12 @@ RUN mkdir -p apps sites/assets/css \ && cd apps \ && git clone --depth 1 https://github.com/frappe/frappe --branch $GIT_BRANCH -COPY build/frappe-nginx/build.sh /build.sh -RUN /build.sh +RUN cd /home/frappe/frappe-bench/apps/frappe \ + && yarn \ + && yarn run production \ + && rm -fr node_modules \ + && yarn install --production=true + RUN node --version \ && npm --version \ && yarn --version diff --git a/build/frappe-nginx/build.sh b/build/frappe-nginx/build.sh deleted file mode 100755 index f9b01dbb..00000000 --- a/build/frappe-nginx/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -function nodeCleanUp() { - rm -fr node_modules - yarn install --production=true -} - -cd /home/frappe/frappe-bench/apps/frappe -yarn -yarn run production - -if [[ "$GIT_BRANCH" =~ ^(version-12|version-11)$ ]]; then - nodeCleanUp -else - nodeCleanUp - # remove this when frappe framework moves this to dependencies from devDependencies - yarn add node-sass -fi