diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index 485cb5eed..3c6e63bb4 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [20, 22, 23] steps: - name: Checkout repository @@ -53,7 +53,7 @@ jobs: run: pnpm config set auto-install-peers false - name: Install libreoffice - uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + uses: awalsh128/cache-apt-pkgs-action@v1.5.0 with: packages: libreoffice libreoffice-pdfimport version: 1.0 @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [20, 22, 23] steps: - name: Checkout repository @@ -113,7 +113,7 @@ jobs: run: pnpm config set auto-install-peers false - name: Install libreoffice - uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + uses: awalsh128/cache-apt-pkgs-action@v1.5.0 with: packages: libreoffice libreoffice-pdfimport version: 1.0 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cd1143d45..1c2c4e9ea 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,6 +22,9 @@ jobs: - name: Check out uses: actions/checkout@v4 + with: + path: etherpad + - name: Set up QEMU if: github.event_name == 'push' @@ -33,7 +36,7 @@ jobs: name: Build and export to Docker uses: docker/build-push-action@v6 with: - context: . + context: ./etherpad target: production load: true tags: ${{ env.TEST_TAG }} @@ -62,6 +65,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: Test + working-directory: etherpad run: | docker run --rm -d -p 9001:9001 --name test ${{ env.TEST_TAG }} ./bin/installDeps.sh @@ -98,10 +102,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push + id: build-docker if: github.event_name == 'push' uses: docker/build-push-action@v6 with: - context: . + context: ./etherpad target: production platforms: linux/amd64,linux/arm64 push: true @@ -111,7 +116,28 @@ jobs: uses: peter-evans/dockerhub-description@v4 if: github.ref == 'refs/heads/master' with: + readme-filepath: ./etherpad/README.md username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} repository: etherpad/etherpad enable-url-completion: true + - name: Check out + uses: actions/checkout@v4 + with: + path: ether-charts + repository: ether/ether-charts + token: ${{ secrets.ETHER_CHART_TOKEN }} + - name: Update tag in values-dev.yaml + if: success() && github.ref == 'refs/heads/develop' + working-directory: ether-charts + run: | + sed -i 's/tag: ".*"/tag: "${{ steps.build-docker.outputs.digest }}"/' values-dev.yaml + - name: Commit and push changes + working-directory: ether-charts + if: success() && github.ref == 'refs/heads/develop' + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add values-dev.yaml + git commit -m 'Update develop image tag' + git push diff --git a/.github/workflows/frontend-admin-tests.yml b/.github/workflows/frontend-admin-tests.yml index 9231cb6ff..4963fac24 100644 --- a/.github/workflows/frontend-admin-tests.yml +++ b/.github/workflows/frontend-admin-tests.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - node: [20, 22] + node: [20, 22, 23] steps: - diff --git a/.github/workflows/upgrade-from-latest-release.yml b/.github/workflows/upgrade-from-latest-release.yml index 43d61b9b5..08421e7ec 100644 --- a/.github/workflows/upgrade-from-latest-release.yml +++ b/.github/workflows/upgrade-from-latest-release.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [20, 22, 23] steps: - name: Check out latest release @@ -43,7 +43,7 @@ jobs: - name: Only install direct dependencies run: pnpm config set auto-install-peers false - name: Install libreoffice - uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + uses: awalsh128/cache-apt-pkgs-action@v1.5.0 with: packages: libreoffice libreoffice-pdfimport version: 1.0 @@ -62,7 +62,7 @@ jobs: run: pnpm config set auto-install-peers false - name: Install libreoffice - uses: awalsh128/cache-apt-pkgs-action@v1.4.2 + uses: awalsh128/cache-apt-pkgs-action@v1.5.0 with: packages: libreoffice libreoffice-pdfimport version: 1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index ae2ce734c..e0a70e7dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,38 @@ +# 2.3.0 + +### Notable enhancements and fixes + +- 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. +- 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. + +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 :). + + +- 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. + + + + +# 2.2.7 + + +### Notable enhancements and fixes + +- We migrated all important pages to React 19 and React Router v7 + +Besides that only dependency updates. + + + -> Have a merry Christmas and a happy new year. 🎄 🎁 + + +# 2.2.6 + +### Notable enhancements and fixes + +- Added option to delete a pad by the creator. This option can be found in the settings menu. When you click on it you get a confirm dialog and after that you have the chance to completely erase the pad. + + # 2.2.5 ### Notable enhancements and fixes diff --git a/Dockerfile b/Dockerfile index 4feb79909..eccecab90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,10 @@ # https://github.com/ether/etherpad-lite # # Author: muxator +ARG BUILD_ENV=git FROM node:alpine AS adminbuild -RUN npm install -g pnpm@9.0.4 +RUN npm install -g pnpm@latest WORKDIR /opt/etherpad-lite COPY . . RUN pnpm install @@ -99,7 +100,7 @@ RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}" # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 RUN \ mkdir -p /usr/share/man/man1 && \ - npm install pnpm@9.0.4 -g && \ + npm install pnpm@latest -g && \ apk update && apk upgrade && \ apk add --no-cache \ ca-certificates \ @@ -113,26 +114,49 @@ USER etherpad WORKDIR "${EP_DIR}" # etherpads version feature requires this. Only copy what is really needed -COPY --chown=etherpad:etherpad ./.git/HEA[D] ./.git/HEAD -COPY --chown=etherpad:etherpad ./.git/ref[s] ./.git/refs COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json COPY --chown=etherpad:etherpad ./var ./var COPY --chown=etherpad:etherpad ./bin ./bin COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./ -FROM build AS development + + +FROM build AS build_git +ONBUILD COPY --chown=etherpad:etherpad ./.git/HEA[D] ./.git/HEAD +ONBUILD COPY --chown=etherpad:etherpad ./.git/ref[s] ./.git/refs + +FROM build AS build_copy + + + + +FROM build_${BUILD_ENV} AS development + +ARG ETHERPAD_PLUGINS= +ARG ETHERPAD_LOCAL_PLUGINS= +ARG ETHERPAD_LOCAL_PLUGINS_ENV= +ARG ETHERPAD_GITHUB_PLUGINS= COPY --chown=etherpad:etherpad ./src/ ./src/ COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/ templates/admin./src/templates/admin COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc +COPY --chown=etherpad:etherpad ./local_plugin[s] ./local_plugins/ + +RUN bash -c ./bin/installLocalPlugins.sh + RUN bin/installDeps.sh && \ - if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \ - pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \ - fi + if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \ + pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \ + fi -FROM build AS production +FROM build_${BUILD_ENV} AS production + +ARG ETHERPAD_PLUGINS= +ARG ETHERPAD_LOCAL_PLUGINS= +ARG ETHERPAD_LOCAL_PLUGINS_ENV= +ARG ETHERPAD_GITHUB_PLUGINS= ENV NODE_ENV=production ENV ETHERPAD_PRODUCTION=true @@ -141,10 +165,14 @@ COPY --chown=etherpad:etherpad ./src ./src COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/templates/admin ./src/templates/admin COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc -RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \ - if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \ - pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \ - fi +COPY --chown=etherpad:etherpad ./local_plugin[s] ./local_plugins/ + +RUN bash -c ./bin/installLocalPlugins.sh + +RUN bin/installDeps.sh && \ + if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_GITHUB_PLUGINS}" ]; then \ + pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \ + fi # Copy the configuration file. COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json diff --git a/README.md b/README.md index fbcd4c805..32e183081 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ services: # ports: # - "5432:5432" volumes: - - postgres_data:/var/lib/postgresql/data/pgdata + - postgres_data:/var/lib/postgresql/data volumes: postgres_data: @@ -174,6 +174,31 @@ following plugins: that each user's chosen color, display name, comment ownership, etc. is strongly linked to their account. +### Upgrade Etherpad + +Run the following command in your Etherpad folder to upgrade + +1. Stop any running Etherpad (manual, systemd ...) +2. Get present version +```sh +git -P tag --contains +``` +3. List versions available +```sh +git -P tag --list "v*" --merged +``` +4. Select the version +```sh +git checkout v2.2.5 +git switch -c v2.2.5 +``` +5. Upgrade Etherpad +```sh +./bin/run.sh +``` +6. Stop with [CTRL-C] +7. Restart your Etherpad service + ## Next Steps ### Tweak the settings diff --git a/admin/package.json b/admin/package.json index f0d52d2ac..c15adce59 100644 --- a/admin/package.json +++ b/admin/package.json @@ -1,7 +1,7 @@ { "name": "admin", "private": true, - "version": "2.2.5", + "version": "2.3.0", "type": "module", "scripts": { "dev": "vite", @@ -11,32 +11,32 @@ "preview": "vite preview" }, "dependencies": { - "@radix-ui/react-switch": "^1.1.0" + "@radix-ui/react-switch": "^1.1.4" }, "devDependencies": { - "@radix-ui/react-dialog": "^1.1.1", - "@radix-ui/react-toast": "^1.2.1", - "@types/react": "^18.3.8", - "@types/react-dom": "^18.2.25", - "@typescript-eslint/eslint-plugin": "^8.6.0", - "@typescript-eslint/parser": "^8.6.0", - "@vitejs/plugin-react-swc": "^3.5.0", - "eslint": "^9.10.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-react-refresh": "^0.4.12", - "i18next": "^23.15.1", - "i18next-browser-languagedetector": "^8.0.0", - "lucide-react": "^0.441.0", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-hook-form": "^7.53.0", - "react-i18next": "^15.0.2", - "react-router-dom": "^6.26.2", - "socket.io-client": "^4.7.5", - "typescript": "^5.6.2", - "vite": "^5.4.7", - "vite-plugin-static-copy": "^1.0.6", - "vite-plugin-svgr": "^4.2.0", - "zustand": "^4.5.5" + "@radix-ui/react-dialog": "^1.1.7", + "@radix-ui/react-toast": "^1.2.7", + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.2", + "@typescript-eslint/eslint-plugin": "^8.30.1", + "@typescript-eslint/parser": "^8.30.1", + "@vitejs/plugin-react-swc": "^3.9.0", + "eslint": "^9.23.0", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-refresh": "^0.4.19", + "i18next": "^25.0.0", + "i18next-browser-languagedetector": "^8.0.5", + "lucide-react": "^0.501.0", + "react": "^19.1.0", + "react-dom": "^19.1.0", + "react-hook-form": "^7.55.0", + "react-i18next": "^15.4.1", + "react-router-dom": "^7.5.1", + "socket.io-client": "^4.8.1", + "typescript": "^5.8.2", + "vite": "^6.3.2", + "vite-plugin-static-copy": "^2.3.1", + "vite-plugin-svgr": "^4.3.0", + "zustand": "^5.0.3" } } diff --git a/admin/src/App.tsx b/admin/src/App.tsx index 708bd1bfd..ae23ab3d3 100644 --- a/admin/src/App.tsx +++ b/admin/src/App.tsx @@ -95,7 +95,9 @@ export const App = () => {

Etherpad