From b35959376ea8bc49e950e3b9ce9b6a209bb71ec7 Mon Sep 17 00:00:00 2001 From: mcrosson Date: Mon, 16 Jul 2018 17:10:40 +0000 Subject: [PATCH 1/4] Update docker start script to bust the cache on each run --- container-start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container-start.sh b/container-start.sh index 990a83cd2..8e274b19a 100755 --- a/container-start.sh +++ b/container-start.sh @@ -24,5 +24,5 @@ sedeasy() { [ -n "$LOG_TO_STDOUT" ] && echo "Logging to stdout: $LOG_TO_STDOUT" \ && sedeasy "logToStdout: [^,]*," "logToStdout: ${LOG_TO_STDOUT}," customize/config.js - +export FRESH=1 exec node ./server.js From b8a745832dca59b10a0bb3f54a3dad72bbfc5bc8 Mon Sep 17 00:00:00 2001 From: mcrosson Date: Mon, 16 Jul 2018 17:16:22 +0000 Subject: [PATCH 2/4] Add Dockerfile for arm64 support --- Dockerfile.arm64 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Dockerfile.arm64 diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 new file mode 100644 index 000000000..77842d163 --- /dev/null +++ b/Dockerfile.arm64 @@ -0,0 +1,25 @@ +FROM arm64v8/node:6 + +COPY . /cryptpad +WORKDIR /cryptpad + +RUN npm config set unsafe-perm true + +ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini-static-arm64 /sbin/tini +RUN chmod a+x /sbin/tini + +RUN apt install -y git \ + && npm install --production \ + && npm install -g bower \ + && bower install --allow-root + +EXPOSE 3000 + +VOLUME /cryptpad/datastore +VOLUME /cryptpad/customize + +ENV USE_SSL=false +ENV STORAGE='./storage/file' +ENV LOG_TO_STDOUT=true + +CMD ["/sbin/tini", "--", "/cryptpad/container-start.sh"] From 172263d1901d268c845c0b75ef6b3328d42ecdb0 Mon Sep 17 00:00:00 2001 From: mcrosson Date: Mon, 16 Jul 2018 19:12:49 +0000 Subject: [PATCH 3/4] Expose safe port, fix storage variable so it doesn't cause a break in the config at runtime --- Dockerfile.arm64 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 77842d163..ec11ddc55 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -13,13 +13,13 @@ RUN apt install -y git \ && npm install -g bower \ && bower install --allow-root -EXPOSE 3000 +EXPOSE 3000 3001 VOLUME /cryptpad/datastore VOLUME /cryptpad/customize ENV USE_SSL=false -ENV STORAGE='./storage/file' +ENV STORAGE=\'./storage/file\' ENV LOG_TO_STDOUT=true CMD ["/sbin/tini", "--", "/cryptpad/container-start.sh"] From b558004fb84513083d6753e79eb885156e386f11 Mon Sep 17 00:00:00 2001 From: mcrosson Date: Mon, 16 Jul 2018 19:13:57 +0000 Subject: [PATCH 4/4] Expose port 3001 for safe http port ; fix STORAGE variable so it doesn't break the config at runtime --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index da60937bf..5b22f39bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,13 @@ RUN apk add --no-cache git tini \ && npm install -g bower \ && bower install --allow-root -EXPOSE 3000 +EXPOSE 3000 3001 VOLUME /cryptpad/datastore VOLUME /cryptpad/customize ENV USE_SSL=false -ENV STORAGE='./storage/file' +ENV STORAGE=\'./storage/file\' ENV LOG_TO_STDOUT=true CMD ["/sbin/tini", "--", "/cryptpad/container-start.sh"]