From ca762687e0ff96712bc4707527fa993dcba3956d Mon Sep 17 00:00:00 2001
From: Quentin Duchemin <quentinduchemin@tuta.io>
Date: Mon, 27 Apr 2020 22:32:26 +0200
Subject: [PATCH] [Etherpad] Fix bad path when building landing page

---
 pica-etherpad/Dockerfile                  | 12 +++++++-----
 pica-etherpad/landing-page/build/build.sh |  4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/pica-etherpad/Dockerfile b/pica-etherpad/Dockerfile
index 7d58212b..c7af7c7e 100644
--- a/pica-etherpad/Dockerfile
+++ b/pica-etherpad/Dockerfile
@@ -23,7 +23,7 @@ RUN apt-get update && \
       pkg-config \
       python \
       unzip && \
-    mkdir -p /opt/etherpad-lite
+    mkdir -p /opt/etherpad-lite/
 
 WORKDIR /opt/etherpad-lite
 # Install Etherpad
@@ -31,13 +31,15 @@ RUN curl -SL https://github.com/ether/etherpad-lite/archive/${ETHERPAD_VERSION_B
     unzip etherpad && \
     rm -Rf etherpad.zip etherpad-lite-${ETHERPAD_VERSION_BUILD}/.git && \
     mv etherpad-lite-${ETHERPAD_VERSION_BUILD}/* . && \
-    bin/installDeps.sh && \
+    bin/installDeps.sh
+
+COPY ./landing-page ./src/templates/landing-page
 
 # Build and replace landing page
 RUN npm install minify && \
-    /builds/$CI_PROJECT_PATH/landing-page/build/build.sh && \
-    cp /builds/$CI_PROJECT_PATH/landing-page/index.html src/templates/index.html && \
-    cp -r /builds/$CI_PROJECT_PATH/landing-page/static/* src/static/
+    ./src/templates/landing-page/build/build.sh && \
+    cp ./src/templates/landing-page/index.html src/templates/index.html && \
+    cp -r ./src/templates/landing-page/static/* src/static/
 
 # Install plugins
 RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}"; done && \
diff --git a/pica-etherpad/landing-page/build/build.sh b/pica-etherpad/landing-page/build/build.sh
index c44f4a2e..da29221f 100755
--- a/pica-etherpad/landing-page/build/build.sh
+++ b/pica-etherpad/landing-page/build/build.sh
@@ -25,8 +25,8 @@ if [ ! $MINIFY ]; then
   MINIFY=$(command -v minify.js) || true
 fi
 
-if [ -f ../node_modules/minify/bin/minify.js ]; then
-  MINIFY="../node_modules/minify/bin/minify.js"
+if [ -f /opt/etherpad-lite/node_modules/minify/bin/minify.js ]; then
+  MINIFY="/opt/etherpad-lite/node_modules/minify/bin/minify.js"
 fi
 
 # If there are missing dependencies, print install instructions
-- 
GitLab