diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index f2099e1fc..000000000 --- a/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -data -Dockerfile -docker-compose.yml -.dockerignore -.git -.gitignore -node_modules diff --git a/.env b/.env deleted file mode 100644 index 95961b566..000000000 --- a/.env +++ /dev/null @@ -1,4 +0,0 @@ -VERSION=latest -USE_SSL=true -STORAGE='./storage/file' -LOG_TO_STDOUT=true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c877e437e..000000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -branches: - only: - - master - - soon - - staging -node_js: - - "6.6.0" -script: - - npm run-script lint - - docker build -t xwiki/cryptpad . diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index dcb07cf07..000000000 --- a/Dockerfile +++ /dev/null @@ -1,45 +0,0 @@ -# We use multi stage builds -FROM node:12-stretch-slim AS build - -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq git jq python curl -RUN npm install -g bower - -# install tini in this stage to avoid the need of jq and python -# in the final image -ADD docker-install-tini.sh /usr/local/bin/docker-install-tini.sh -RUN /usr/local/bin/docker-install-tini.sh - -COPY . /cryptpad -WORKDIR /cryptpad - -RUN npm install --production \ - && npm install -g bower \ - && bower install --allow-root - -FROM node:12-stretch-slim - -# You want USE_SSL=true if not putting cryptpad behind a proxy -ENV USE_SSL=false -ENV STORAGE="'./storage/file'" -ENV LOG_TO_STDOUT=true - -# Persistent storage needs -VOLUME /cryptpad/cfg -VOLUME /cryptpad/datastore -VOLUME /cryptpad/customize -VOLUME /cryptpad/blobstage -VOLUME /cryptpad/block -VOLUME /cryptpad/blob -VOLUME /cryptpad/data - -# Copy cryptpad and tini from the build container -COPY --from=build /sbin/tini /sbin/tini -COPY --from=build /cryptpad /cryptpad - -WORKDIR /cryptpad - -# Unsafe / Safe ports -EXPOSE 3000 3001 - -# Run cryptpad on startup -CMD ["/sbin/tini", "--", "/cryptpad/container-start.sh"] diff --git a/container-start.sh b/container-start.sh deleted file mode 100755 index 9f28d0127..000000000 --- a/container-start.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# Creating customize folder -mkdir -p customize - -# Copying default config -mkdir -p cfg -[ ! -f cfg/config.js ] && echo "Creating config.js" && cp config/config.example.js cfg/config.js - -# Linking config.js -[ ! -L config/config.js ] && echo "Linking config.js" && ln -s ../cfg/config.js config/config.js - - -# Thanks to http://stackoverflow.com/a/10467453 -sedeasy() { - sed -i "s/$1/$(echo $2 | sed -e 's/[\/&]/\\&/g')/g" $3 -} - -# Configure -[ -n "$STORAGE" ] && echo "Using storage adapter: $STORAGE" \ - && sedeasy "storage: [^,]*," "storage: ${STORAGE}," cfg/config.js - -[ -n "$LOG_TO_STDOUT" ] && echo "Logging to stdout: $LOG_TO_STDOUT" \ - && sedeasy "logToStdout: [^,]*," "logToStdout: ${LOG_TO_STDOUT}," cfg/config.js - -export FRESH=1 -exec node ./server.js diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index e0d977866..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,31 +0,0 @@ -version: '2' -services: - - cryptpad: - build: - context: . - args: - - VERSION=${VERSION} - image: "xwiki/cryptpad:${VERSION}" - hostname: cryptpad - - labels: - - traefik.port=3000 - - traefik.frontend.passHostHeader=true - environment: - - USE_SSL=${USE_SSL} - - STORAGE=${STORAGE} - - LOG_TO_STDOUT=${LOG_TO_STDOUT} - - ports: - - "3000:3000" - - "3001:3001" - - restart: always - volumes: - - ./data/files:/cryptpad/datastore:rw - - ./data/customize:/cryptpad/customize:rw - - ./data/blob:/cryptpad/blob:rw - - ./data/block:/cryptpad/block:rw - - ./data/config:/cryptpad/cfg:rw - - ./data/data:/cryptpad/data:rw diff --git a/docker-install-tini.sh b/docker-install-tini.sh deleted file mode 100755 index a9a92e871..000000000 --- a/docker-install-tini.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Figure out latest release via GitHub API -release=$(curl --silent "https://api.github.com/repos/krallin/tini/releases/latest" | jq -r .tag_name) - -# _Reliable_ way to get which arch for tini download -arch=$(python < ./data/files -- cryptpad/customize --> ./data/customize -- cryptpad/pins --> ./data/pins -- cryptpad/blob --> ./data/blob -- cryptpad/blobstage --> ./data/blobstage -- cryptpad/tasks --> ./data/tasks -- cryptpad/block --> ./data/block - -Your configuration file will be in `./data/customize/config.js`. - -The data folder is ignored by git, so if you want to add your customizations to git versioning change the volume: - -``` -./customize:/cryptpad/customize:rw -``` - -## SSL Proxy - -The [traefik](https://traefik.io/) proxy has builtin Let'sEncrypt for easy SSL setup. -In the docker-compose file you can find preset lables for usage with traefik. - -[Traefik Docker Image](https://hub.docker.com/_/traefik/) - -Alternativly just use plain old nginx. diff --git a/readme.md b/readme.md index 2556a8223..1df9d462d 100644 --- a/readme.md +++ b/readme.md @@ -22,7 +22,7 @@ The most recent version and all past release notes can be found [here](https://g ## Setup using Docker -See [Cryptpad-Docker](docs/cryptpad-docker.md) and the community wiki's [Docker](https://github.com/xwiki-labs/cryptpad/wiki/Docker) page for details on how to get up-and-running with Cryptpad in Docker. +See [Cryptpad-Docker](https://github.com/xwiki-labs/cryptpad-docker) page for details on how to get up-and-running with Cryptpad in Docker. This repository is maintained by the community and not officially supported. ## Setup using Ansible diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index 0eb35b824..97efe0674 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -220,6 +220,7 @@ define([ setTimeout(saveChanges); } padChatChannel = channel; + console.error('Chat ID:', channel); ctx.sframeChan.query('Q_CHAT_OPENPADCHAT', channel, function (err, obj) { if (err || (obj && obj.error)) { console.error(err || (obj && obj.error)); } });