Skip to content

Commit 3a9e126

Browse files
committed
Merge branch 'develop'
2 parents 0da15a4 + 6a37a5c commit 3a9e126

26 files changed

+3191
-3135
lines changed

.github/workflows/backend-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: pnpm config set auto-install-peers false
5454
-
5555
name: Install libreoffice
56-
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
56+
uses: awalsh128/cache-apt-pkgs-action@v1.5.0
5757
with:
5858
packages: libreoffice libreoffice-pdfimport
5959
version: 1.0
@@ -113,7 +113,7 @@ jobs:
113113
run: pnpm config set auto-install-peers false
114114
-
115115
name: Install libreoffice
116-
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
116+
uses: awalsh128/cache-apt-pkgs-action@v1.5.0
117117
with:
118118
packages: libreoffice libreoffice-pdfimport
119119
version: 1.0

.github/workflows/upgrade-from-latest-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Only install direct dependencies
4444
run: pnpm config set auto-install-peers false
4545
- name: Install libreoffice
46-
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
46+
uses: awalsh128/cache-apt-pkgs-action@v1.5.0
4747
with:
4848
packages: libreoffice libreoffice-pdfimport
4949
version: 1.0
@@ -62,7 +62,7 @@ jobs:
6262
run: pnpm config set auto-install-peers false
6363
-
6464
name: Install libreoffice
65-
uses: awalsh128/cache-apt-pkgs-action@v1.4.2
65+
uses: awalsh128/cache-apt-pkgs-action@v1.5.0
6666
with:
6767
packages: libreoffice libreoffice-pdfimport
6868
version: 1.0

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# 2.3.0
2+
3+
### Notable enhancements and fixes
4+
5+
- Added possibility to cluster Etherpads behind reverse proxy. There is now a new reverse proxy designed for Etherpads that handles multiple Etherpads and the created pads in them. It will assign the pad assignement to an Etherpad at random but once the choice was made it will always reverse proxy the same backend. This allows to host multiple concurrent Etherpads and benefit from multi core systems even though one Etherpad is singlethreaded.
6+
- Added reverse proxy configuration for replacing Nginx. In the past there were some issues with nginx and its configuration. This reverse proxy allows you to handle your configuration with ease.
7+
8+
If you want to find out more about the reverse proxy method check out the repository https://github.com/ether/etherpad-proxy . It also contains a sample docker-compose file with three Etherpads and one etherpad-proxy. Of course you need to adapt the settings.json.template to your liking and map it into the reverse proxy image before you are ready :).
9+
10+
11+
- Added client authorization to work with Etherpad. Before it would get blocked because it doesn't have the required claim. As this is now fixed etherpad-proxy can also work with your new OAuth2 configuration and retrieve a token via client credentials flow.
12+
13+
14+
15+
116
# 2.2.7
217

318

Dockerfile

+41-13
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# https://github.com/ether/etherpad-lite
44
#
55
# Author: muxator
6+
ARG BUILD_ENV=git
67

78
FROM node:alpine AS adminbuild
8-
RUN npm install -g pnpm@9.0.4
9+
RUN npm install -g pnpm@latest
910
WORKDIR /opt/etherpad-lite
1011
COPY . .
1112
RUN pnpm install
@@ -99,7 +100,7 @@ RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
99100
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
100101
RUN \
101102
mkdir -p /usr/share/man/man1 && \
102-
npm install pnpm@9.0.4 -g && \
103+
npm install pnpm@latest -g && \
103104
apk update && apk upgrade && \
104105
apk add --no-cache \
105106
ca-certificates \
@@ -113,26 +114,49 @@ USER etherpad
113114
WORKDIR "${EP_DIR}"
114115

115116
# etherpads version feature requires this. Only copy what is really needed
116-
COPY --chown=etherpad:etherpad ./.git/HEA[D] ./.git/HEAD
117-
COPY --chown=etherpad:etherpad ./.git/ref[s] ./.git/refs
118117
COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json
119118
COPY --chown=etherpad:etherpad ./var ./var
120119
COPY --chown=etherpad:etherpad ./bin ./bin
121120
COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./
122121

123-
FROM build AS development
122+
123+
124+
FROM build AS build_git
125+
ONBUILD COPY --chown=etherpad:etherpad ./.git/HEA[D] ./.git/HEAD
126+
ONBUILD COPY --chown=etherpad:etherpad ./.git/ref[s] ./.git/refs
127+
128+
FROM build AS build_copy
129+
130+
131+
132+
133+
FROM build_${BUILD_ENV} AS development
134+
135+
ARG ETHERPAD_PLUGINS=
136+
ARG ETHERPAD_LOCAL_PLUGINS=
137+
ARG ETHERPAD_LOCAL_PLUGINS_ENV=
138+
ARG ETHERPAD_GITHUB_PLUGINS=
124139

125140
COPY --chown=etherpad:etherpad ./src/ ./src/
126141
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/ templates/admin./src/templates/admin
127142
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc
128143

144+
COPY --chown=etherpad:etherpad ./local_plugin[s] ./local_plugins/
145+
146+
RUN bash -c ./bin/installLocalPlugins.sh
147+
129148
RUN bin/installDeps.sh && \
130-
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \
131-
pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \
132-
fi
149+
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \
150+
pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \
151+
fi
133152

134153

135-
FROM build AS production
154+
FROM build_${BUILD_ENV} AS production
155+
156+
ARG ETHERPAD_PLUGINS=
157+
ARG ETHERPAD_LOCAL_PLUGINS=
158+
ARG ETHERPAD_LOCAL_PLUGINS_ENV=
159+
ARG ETHERPAD_GITHUB_PLUGINS=
136160

137161
ENV NODE_ENV=production
138162
ENV ETHERPAD_PRODUCTION=true
@@ -141,10 +165,14 @@ COPY --chown=etherpad:etherpad ./src ./src
141165
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/templates/admin ./src/templates/admin
142166
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc
143167

144-
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \
145-
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \
146-
pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \
147-
fi
168+
COPY --chown=etherpad:etherpad ./local_plugin[s] ./local_plugins/
169+
170+
RUN bash -c ./bin/installLocalPlugins.sh
171+
172+
RUN bin/installDeps.sh && \
173+
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \
174+
pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \
175+
fi
148176

149177
# Copy the configuration file.
150178
COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json

admin/package.json

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "admin",
33
"private": true,
4-
"version": "2.2.7",
4+
"version": "2.3.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -11,32 +11,32 @@
1111
"preview": "vite preview"
1212
},
1313
"dependencies": {
14-
"@radix-ui/react-switch": "^1.1.2"
14+
"@radix-ui/react-switch": "^1.1.3"
1515
},
1616
"devDependencies": {
17-
"@radix-ui/react-dialog": "^1.1.4",
18-
"@radix-ui/react-toast": "^1.2.4",
19-
"@types/react": "^19.0.2",
20-
"@types/react-dom": "^19.0.2",
21-
"@typescript-eslint/eslint-plugin": "^8.18.1",
22-
"@typescript-eslint/parser": "^8.18.1",
23-
"@vitejs/plugin-react-swc": "^3.7.2",
24-
"eslint": "^9.17.0",
25-
"eslint-plugin-react-hooks": "^5.1.0",
26-
"eslint-plugin-react-refresh": "^0.4.16",
27-
"i18next": "^24.2.0",
28-
"i18next-browser-languagedetector": "^8.0.2",
29-
"lucide-react": "^0.469.0",
30-
"react": "^19.0.0",
31-
"react-dom": "^19.0.0",
32-
"react-hook-form": "^7.54.1",
33-
"react-i18next": "^15.2.0",
34-
"react-router-dom": "^7.0.2",
17+
"@radix-ui/react-dialog": "^1.1.6",
18+
"@radix-ui/react-toast": "^1.2.6",
19+
"@types/react": "^19.0.12",
20+
"@types/react-dom": "^19.0.4",
21+
"@typescript-eslint/eslint-plugin": "^8.28.0",
22+
"@typescript-eslint/parser": "^8.28.0",
23+
"@vitejs/plugin-react-swc": "^3.8.1",
24+
"eslint": "^9.23.0",
25+
"eslint-plugin-react-hooks": "^5.2.0",
26+
"eslint-plugin-react-refresh": "^0.4.19",
27+
"i18next": "^24.2.3",
28+
"i18next-browser-languagedetector": "^8.0.4",
29+
"lucide-react": "^0.487.0",
30+
"react": "^19.1.0",
31+
"react-dom": "^19.1.0",
32+
"react-hook-form": "^7.55.0",
33+
"react-i18next": "^15.4.1",
34+
"react-router-dom": "^7.4.1",
3535
"socket.io-client": "^4.8.1",
36-
"typescript": "^5.7.2",
37-
"vite": "^6.0.5",
38-
"vite-plugin-static-copy": "^2.2.0",
36+
"typescript": "^5.8.2",
37+
"vite": "^6.2.5",
38+
"vite-plugin-static-copy": "^2.3.0",
3939
"vite-plugin-svgr": "^4.3.0",
40-
"zustand": "^5.0.2"
40+
"zustand": "^5.0.3"
4141
}
4242
}

bin/installLocalPlugins.sh

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
5+
trim() {
6+
local var="$*"
7+
# remove leading whitespace characters
8+
var="${var#"${var%%[![:space:]]*}"}"
9+
# remove trailing whitespace characters
10+
var="${var%"${var##*[![:space:]]}"}"
11+
printf '%s' "$var"
12+
}
13+
14+
# Move to the Etherpad base directory.
15+
MY_DIR=$(cd "${0%/*}" && pwd -P) || exit 1
16+
cd "${MY_DIR}/.." || exit 1
17+
18+
# Source constants and useful functions
19+
. bin/functions.sh
20+
21+
PNPM_OPTIONS=
22+
if [ ! -z "${NODE_ENV-}" ]; then
23+
if [ "$NODE_ENV" == 'production' ]; then
24+
PNPM_OPTIONS='--prod'
25+
fi
26+
fi
27+
28+
if [ ! -z "${ETHERPAD_LOCAL_PLUGINS_ENV-}" ]; then
29+
if [ "$ETHERPAD_LOCAL_PLUGINS_ENV" == 'production' ]; then
30+
PNPM_OPTIONS='--prod'
31+
elif [ "$ETHERPAD_LOCAL_PLUGINS_ENV" == 'development' ]; then
32+
PNPM_OPTIONS='-D'
33+
fi
34+
fi
35+
36+
if [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then
37+
readarray -d ' ' plugins <<< "${ETHERPAD_LOCAL_PLUGINS}"
38+
for plugin in "${plugins[@]}"; do
39+
plugin=$(trim "$plugin")
40+
if [ -d "local_plugins/${plugin}" ]; then
41+
echo "Installing plugin: '${plugin}'"
42+
pnpm install -w ${PNPM_OPTIONS:-} "local_plugins/${plugin}/"
43+
else
44+
( echo "Error. Directory 'local_plugins/${plugin}' for local plugin " \
45+
"'${plugin}' missing" >&2 )
46+
exit 1
47+
fi
48+
done
49+
else
50+
echo 'No local plugings to install.'
51+
fi

bin/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"name": "bin",
3-
"version": "2.2.7",
3+
"version": "2.3.0",
44
"description": "",
55
"main": "checkAllPads.js",
66
"directories": {
77
"doc": "doc"
88
},
99
"dependencies": {
10-
"axios": "^1.7.9",
10+
"axios": "^1.8.4",
1111
"ep_etherpad-lite": "workspace:../src",
1212
"log4js": "^6.9.1",
13-
"semver": "^7.6.3",
14-
"tsx": "^4.19.2",
13+
"semver": "^7.7.1",
14+
"tsx": "^4.19.3",
1515
"ueberdb2": "^5.0.6"
1616
},
1717
"devDependencies": {
18-
"@types/node": "^22.10.2",
19-
"@types/semver": "^7.5.8",
20-
"typescript": "^5.7.2"
18+
"@types/node": "^22.13.14",
19+
"@types/semver": "^7.7.0",
20+
"typescript": "^5.8.2"
2121
},
2222
"scripts": {
2323
"makeDocs": "node --import tsx make_docs.ts",

doc/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"devDependencies": {
3-
"vitepress": "^1.5.0"
3+
"vitepress": "^1.6.3"
44
},
55
"scripts": {
66
"docs:dev": "vitepress dev",

local_plugins/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ignore everything
2+
*
3+
!.gitignore

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@
5050
"type": "git",
5151
"url": "https://github.com/ether/etherpad-lite.git"
5252
},
53-
"version": "2.2.7",
53+
"version": "2.3.0",
5454
"license": "Apache-2.0"
5555
}

0 commit comments

Comments
 (0)