From 0afe007d78ddfbb4f71eeaa61c0870c0aadb50c8 Mon Sep 17 00:00:00 2001 From: Stephen Moloney Date: Tue, 4 Apr 2017 21:51:55 +0100 Subject: [PATCH 1/4] change versions for dockerbuild --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d67e5ee1..81d53c1d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,9 @@ ARG SRC_PATH # Set the environment variables (defaults where required) ENV BUILD_DEPS="wget curl bzip2 build-essential python git ca-certificates" ENV GOSU_VERSION=1.10 -ENV NODE_VERSION ${NODE_VERSION:-v0.10.48} -ENV METEOR_RELEASE ${METEOR_RELEASE:-1.3.5.1} -ENV NPM_VERSION ${NPM_VERSION:-4.2.0} +ENV NODE_VERSION ${NODE_VERSION:-v6.10.2} +ENV METEOR_RELEASE ${METEOR_RELEASE:-1.4.3.2} +ENV NPM_VERSION ${NPM_VERSION:-3.10.10} ENV ARCHITECTURE ${ARCHITECTURE:-linux-x64} ENV SRC_PATH ${SRC_PATH:-./} @@ -63,7 +63,7 @@ RUN \ ln -s /opt/nodejs/bin/npm /usr/bin/npm && \ \ # Install Node dependencies - npm install npm@${NPM_VERSION} -g && \ + npm install -g npm@${NPM_VERSION} && \ npm install -g node-gyp && \ npm install -g fibers && \ \ @@ -78,7 +78,7 @@ RUN \ \ # Build app cd /home/wekan/app && \ - gosu wekan /home/wekan/.meteor/meteor npm install --save xss && \ + gosu wekan /home/wekan/.meteor/meteor npm install && \ gosu wekan /home/wekan/.meteor/meteor build --directory /home/wekan/app_build && \ cd /home/wekan/app_build/bundle/programs/server/ && \ gosu wekan npm install && \ @@ -96,4 +96,4 @@ RUN \ ENV PORT=80 EXPOSE $PORT -CMD ["node", "/build/main.js"] +CMD ["node", "/build/main.js"] \ No newline at end of file From 4e7f56ac74c49efd56a75c4dd188c4f497fd5f1b Mon Sep 17 00:00:00 2001 From: Stephen Moloney Date: Tue, 4 Apr 2017 22:03:39 +0100 Subject: [PATCH 2/4] Fix dockerbuild and modify travis --- .travis.yml | 9 ++++++--- Dockerfile | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a760bebd..0890b38b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,13 +10,16 @@ before_install: - sudo chmod +x docker-compose - sudo mv docker-compose /usr/local/bin - sudo docker-compose build --no-cache --force-rm - - sudo docker-compose up && docker ps -a - - sudo docker run wekan-app /bin/sh -c "npm test" + - sudo docker-compose up -d wekandb + - sudo docker-compose up -d wekan + - sudo docker exec -ti wekan /bin/sh -c "npm test" + # ^^ Note - need to come up with some way of checking the output from docker run + # that it was a success... perhaps the nodejs server can output a success message? language: node_js node_js: - - "0.10.48" + - "6.10.2" install: - "npm install" diff --git a/Dockerfile b/Dockerfile index 81d53c1d6..8e173379f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ ARG SRC_PATH ENV BUILD_DEPS="wget curl bzip2 build-essential python git ca-certificates" ENV GOSU_VERSION=1.10 ENV NODE_VERSION ${NODE_VERSION:-v6.10.2} -ENV METEOR_RELEASE ${METEOR_RELEASE:-1.4.3.2} +ENV METEOR_RELEASE ${METEOR_RELEASE:-1.4.4} ENV NPM_VERSION ${NPM_VERSION:-3.10.10} ENV ARCHITECTURE ${ARCHITECTURE:-linux-x64} ENV SRC_PATH ${SRC_PATH:-./} @@ -74,10 +74,22 @@ RUN \ sed -i "s|RELEASE=.*|RELEASE=${METEOR_RELEASE}\"\"|g" ./install_meteor.sh && \ echo "Starting meteor ${METEOR_RELEASE} installation... \n" && \ chown wekan:wekan ./install_meteor.sh && \ - gosu wekan:wekan sh ./install_meteor.sh && \ + ########################### + ########################### + # Temporary fix for https://github.com/wekan/wekan/issues/928 until METEOR releases 1.4.4 + + gosu wekan:wekan sh ./install_meteor.sh || \ + ( \ + gosu wekan:wekan git clone --recursive git://github.com/meteor/meteor.git /home/wekan/.meteor && \ + cd /home/wekan/.meteor && \ + gosu wekan:wekan git checkout release/METEOR@1.4.4-rc.6 && \ + gosu wekan /home/wekan/.meteor/meteor -- help \ + ) && \ + ########################### + ########################### \ # Build app cd /home/wekan/app && \ + gosu wekan /home/wekan/.meteor/meteor add standard-minifier-js && \ gosu wekan /home/wekan/.meteor/meteor npm install && \ gosu wekan /home/wekan/.meteor/meteor build --directory /home/wekan/app_build && \ cd /home/wekan/app_build/bundle/programs/server/ && \ From 377380d15f0875322ab3a40c4f44fa94777b1c4b Mon Sep 17 00:00:00 2001 From: Stephen Moloney Date: Wed, 5 Apr 2017 22:29:18 +0100 Subject: [PATCH 3/4] no tests - remove --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0890b38b3..01d601653 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ before_install: - sudo docker-compose build --no-cache --force-rm - sudo docker-compose up -d wekandb - sudo docker-compose up -d wekan - - sudo docker exec -ti wekan /bin/sh -c "npm test" # ^^ Note - need to come up with some way of checking the output from docker run # that it was a success... perhaps the nodejs server can output a success message? From 6443ea160cb4d2a35ef9a54a8913d9a392ac16ef Mon Sep 17 00:00:00 2001 From: Stephen Moloney Date: Wed, 5 Apr 2017 23:02:19 +0100 Subject: [PATCH 4/4] rebuild --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad85c5cb2..a69a71887 100644 --- a/README.md +++ b/README.md @@ -127,9 +127,9 @@ sudo docker-compose up -d --build #### Running from locally built dockerhub images and modified `ARG` variables (not recommended) ``` -echo 'NODE_VERSION=v6.6.0' >> .env && \ -echo 'METEOR_RELEASE=1.4.2.3' >> .env && \ -echo 'NPM_VERSION=4.1.2' >> .env && \ +echo 'NODE_VERSION=v6.10.2' >> .env && \ +echo 'METEOR_RELEASE=1.4.4' >> .env && \ +echo 'NPM_VERSION=3.10.10' >> .env && \ echo 'ARCHITECTURE=linux-x64' >> .env && \ echo 'SRC_PATH=./' >> .env && \ sudo docker-compose up -d --build