Skip to content

Fix installation of local plugins (fixes #6912)#6913

Merged
SamTV12345 merged 1 commit intoether:developfrom
CristianCantoro:develop
Apr 5, 2025
Merged

Fix installation of local plugins (fixes #6912)#6913
SamTV12345 merged 1 commit intoether:developfrom
CristianCantoro:develop

Conversation

@CristianCantoro
Copy link
Copy Markdown
Contributor

@CristianCantoro CristianCantoro commented Mar 23, 2025

The background for this pull request is contained in #6912.

This pull request does 3 things:

  1. creates a directory local_plugins in the root repository, with a .gitignore file that ignores all of its contents.
  2. creates a script bin/installLocalPlugins.sh.
  3. modifies the Dockerfile to change the installation process of local plugins:
    • copies the contents of the local_plugins directory into the container (if the directory does not exist, it skips it).
    • defines a new build arg variable ETHERPAD_LOCAL_PLUGINS_ENV
    • install the local plugins with the script bin/installLocalPlugins.sh (which uses pnpm install -w "local_plugins/${plugin}/")

(note: I am not sure that the pnpm -w install command is the best way to install a plugin, I am not an expert node user.)

To install a plugin locally put the it inside the local_plugins directory and pass the name of the directory ETHERPAD_LOCAL_PLUGINS, like this (full log: build-pr-1.log):

docker build --no-cache --progress=plain --target production --build-arg ETHERPAD_LOCAL_PLUGINS="ep_disable_reset_authorship_colours" -t cristiancantoro/etherpad-lite:2.2-fix6912 .

(I am using the ep_disable_reset_authorship_colours as an example)

When running the container with the following command:

docker run -it -p 9001:9001 -v ./copy:/tmp/copy -e ADMIN_PASSWORD=foo cristiancantoro/etherpad-lite:2.2-fix6912

The log shows the following line:

[2025-03-23T19:41:57.719] [INFO] server - Installed plugins: ep_disable_reset_authorship_colours@0.0.25

(full log: run-pr-1.log)

@SamTV12345
Copy link
Copy Markdown
Member

Thanks for the fix. I'll merge when the pipeline is happy :)

@SamTV12345 SamTV12345 merged commit b3a0c3d into ether:develop Apr 5, 2025
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants