diff --git a/docker-compose.yml b/docker-compose.yml index 9920cc0..8ceddb8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,16 +57,12 @@ services: - "host.docker.internal:10.7.7.1" etherpad: - image: etherpad/etherpad:1.8.4 + build: mod/etherpad restart: unless-stopped depends_on: - redis environment: ETHERPAD_API_KEY: ${ETHERPAD_API_KEY} - volumes: - - ./mod/pad/settings.json:/opt/etherpad-lite/settings.json - - ./mod/pad/entrypoint.sh:/entrypoint.sh - entrypoint: /entrypoint.sh networks: bbb-net: ipv4_address: 10.7.7.4 diff --git a/mod/etherpad/Dockerfile b/mod/etherpad/Dockerfile new file mode 100644 index 0000000..92f3577 --- /dev/null +++ b/mod/etherpad/Dockerfile @@ -0,0 +1,21 @@ +FROM etherpad/etherpad:1.8.4 + +USER root + +# install etherpad plugins +# - ep_delete_after_delay_lite +# - ep_redis_publisher +RUN apt-get update \ + && apt-get install -y git \ + && npm install ep_delete_after_delay_lite git+https://git@github.com/pedrobmarin/ep_redis_publisher.git + +# apply "Including more data at pad update event" +# https://github.com/mconf/etherpad-lite/commit/5bc37fc92714e82165386dc0a5dd467609169a87 +# this is a necessary patch for the closed captions +RUN sed -i "s|hooks\.callAll(\"padUpdate\".*)|hooks\.callAll(\"padUpdate\", {'pad':this, 'author': author, 'revs': newRev, 'changeset': aChangeset});|" /opt/etherpad-lite/src/node/db/Pad.js + +COPY settings.json /opt/etherpad-lite/settings.json +COPY entrypoint.sh /entrypoint.sh + +USER etherpad +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/mod/pad/entrypoint.sh b/mod/etherpad/entrypoint.sh similarity index 99% rename from mod/pad/entrypoint.sh rename to mod/etherpad/entrypoint.sh index 21012d4..7586f6c 100755 --- a/mod/pad/entrypoint.sh +++ b/mod/etherpad/entrypoint.sh @@ -1,4 +1,5 @@ #!/bin/bash echo $ETHERPAD_API_KEY > /tmp/apikey export NODE_ENV=production + node /opt/etherpad-lite/node_modules/ep_etherpad-lite/node/server.js --apikey /tmp/apikey \ No newline at end of file diff --git a/mod/pad/settings.json b/mod/etherpad/settings.json similarity index 100% rename from mod/pad/settings.json rename to mod/etherpad/settings.json