etherpad: add plugins (enables closed captions)

This commit is contained in:
chandi 2020-05-31 11:27:32 +02:00
parent e0b82391a2
commit 53a348fded
4 changed files with 23 additions and 5 deletions

View File

@ -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

21
mod/etherpad/Dockerfile Normal file
View File

@ -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"]

View File

@ -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