diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index 3c6e63bb4..485cb5eed 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - node: [20, 22, 23] + node: [18, 20, 22] 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.5.0 + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 with: packages: libreoffice libreoffice-pdfimport version: 1.0 @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - node: [20, 22, 23] + node: [18, 20, 22] 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.5.0 + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 with: packages: libreoffice libreoffice-pdfimport version: 1.0 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c2c4e9ea..cd1143d45 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,9 +22,6 @@ jobs: - name: Check out uses: actions/checkout@v4 - with: - path: etherpad - - name: Set up QEMU if: github.event_name == 'push' @@ -36,7 +33,7 @@ jobs: name: Build and export to Docker uses: docker/build-push-action@v6 with: - context: ./etherpad + context: . target: production load: true tags: ${{ env.TEST_TAG }} @@ -65,7 +62,6 @@ 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 @@ -102,11 +98,10 @@ 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: ./etherpad + context: . target: production platforms: linux/amd64,linux/arm64 push: true @@ -116,28 +111,7 @@ 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 4963fac24..9231cb6ff 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, 23] + node: [20, 22] steps: - diff --git a/.github/workflows/upgrade-from-latest-release.yml b/.github/workflows/upgrade-from-latest-release.yml index 08421e7ec..43d61b9b5 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: [20, 22, 23] + node: [18, 20, 22] 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.5.0 + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 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.5.0 + uses: awalsh128/cache-apt-pkgs-action@v1.4.2 with: packages: libreoffice libreoffice-pdfimport version: 1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index e0a70e7dd..ae2ce734c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,38 +1,3 @@ -# 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 eccecab90..4feb79909 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,9 @@ # https://github.com/ether/etherpad-lite # # Author: muxator -ARG BUILD_ENV=git FROM node:alpine AS adminbuild -RUN npm install -g pnpm@latest +RUN npm install -g pnpm@9.0.4 WORKDIR /opt/etherpad-lite COPY . . RUN pnpm install @@ -100,7 +99,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@latest -g && \ + npm install pnpm@9.0.4 -g && \ apk update && apk upgrade && \ apk add --no-cache \ ca-certificates \ @@ -114,49 +113,26 @@ 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 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= +FROM build AS development 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_GITHUB_PLUGINS}" ]; then \ - pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \ - fi + 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 -FROM build_${BUILD_ENV} AS production - -ARG ETHERPAD_PLUGINS= -ARG ETHERPAD_LOCAL_PLUGINS= -ARG ETHERPAD_LOCAL_PLUGINS_ENV= -ARG ETHERPAD_GITHUB_PLUGINS= +FROM build AS production ENV NODE_ENV=production ENV ETHERPAD_PRODUCTION=true @@ -165,14 +141,10 @@ 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_GITHUB_PLUGINS}" ]; then \ - pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_GITHUB_PLUGINS:+--github ${ETHERPAD_GITHUB_PLUGINS}}; \ - fi +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 the configuration file. COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json diff --git a/README.md b/README.md index 32e183081..fbcd4c805 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ services: # ports: # - "5432:5432" volumes: - - postgres_data:/var/lib/postgresql/data + - postgres_data:/var/lib/postgresql/data/pgdata volumes: postgres_data: @@ -174,31 +174,6 @@ 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 c15adce59..f0d52d2ac 100644 --- a/admin/package.json +++ b/admin/package.json @@ -1,7 +1,7 @@ { "name": "admin", "private": true, - "version": "2.3.0", + "version": "2.2.5", "type": "module", "scripts": { "dev": "vite", @@ -11,32 +11,32 @@ "preview": "vite preview" }, "dependencies": { - "@radix-ui/react-switch": "^1.1.4" + "@radix-ui/react-switch": "^1.1.0" }, "devDependencies": { - "@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" + "@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" } } diff --git a/admin/src/App.tsx b/admin/src/App.tsx index ae23ab3d3..708bd1bfd 100644 --- a/admin/src/App.tsx +++ b/admin/src/App.tsx @@ -95,9 +95,7 @@ export const App = () => {

Etherpad