Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear committed Feb 18, 2021
2 parents 113df1f + 9f317f0 commit 65867eb
Show file tree
Hide file tree
Showing 41 changed files with 567 additions and 405 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ jobs:
- name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh

# configures some settings and runs npm run test
- name: Run the backend tests
run: src/tests/frontend/travis/runnerBackend.sh
run: cd src && npm test

withplugins:
# run on pushes to any branch
Expand Down Expand Up @@ -84,6 +83,5 @@ jobs:
- name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installDeps.sh

# configures some settings and runs npm run test
- name: Run the backend tests
run: src/tests/frontend/travis/runnerBackend.sh
run: cd src && npm test
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- "src/bin/installDeps.sh"
- "cd src && npm install && cd -"
script:
- "src/tests/frontend/travis/runnerBackend.sh"
- "cd src && npm test"
- name: "Test the Dockerfile"
install:
- "cd src && npm install && cd -"
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- *install_plugins
- "cd src && npm install && cd -"
script:
- "src/tests/frontend/travis/runnerBackend.sh"
- "cd src && npm test"
- name: "Test the Dockerfile"
install:
- "cd src && npm install && cd -"
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 1.8.9

### Notable fixes

* Fixed HTTP 400 error when importing via the UI.
* Fixed "Error: spawn npm ENOENT" crash on startup in Windows.

### Notable enhancements

* Removed some unnecessary arrow key handling logic.
* Dependency updates.

# 1.8.8

### Security patches
Expand Down
25 changes: 24 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
# ETHERPAD_PLUGINS="ep_codepad ep_author_neat"
ARG ETHERPAD_PLUGINS=

# Control whether abiword will be installed, enabling exports to DOC/PDF/ODT formats.
# By default, it is not installed.
# If given any value, abiword will be installed.
#
# EXAMPLE:
# INSTALL_ABIWORD=true
ARG INSTALL_ABIWORD=

# Control whether libreoffice will be installed, enabling exports to DOC/PDF/ODT formats.
# By default, it is not installed.
# If given any value, libreoffice will be installed.
#
# EXAMPLE:
# INSTALL_LIBREOFFICE=true
ARG INSTALL_SOFFICE=

# By default, Etherpad container is built and run in "production" mode. This is
# leaner (development dependencies are not installed) and runs faster (among
# other things, assets are minified & compressed).
Expand All @@ -28,6 +44,13 @@ RUN useradd --uid 5001 --create-home etherpad

RUN mkdir /opt/etherpad-lite && chown etherpad:0 /opt/etherpad-lite

# install abiword for DOC/PDF/ODT export
RUN [ -z "${INSTALL_ABIWORD}" ] || (apt update && apt -y install abiword && apt clean && rm -rf /var/lib/apt/lists/*)

# install libreoffice for DOC/PDF/ODT export
# the mkdir is needed for configuration of openjdk-11-jre-headless, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199
RUN [ -z "${INSTALL_SOFFICE}" ] || (apt update && mkdir -p /usr/share/man/man1 && apt -y install libreoffice && apt clean && rm -rf /var/lib/apt/lists/*)

USER etherpad

WORKDIR /opt/etherpad-lite
Expand All @@ -51,4 +74,4 @@ COPY --chown=etherpad:0 ./settings.json.docker /opt/etherpad-lite/settings.json
RUN chmod -R g=u .

EXPOSE 9001
CMD ["node", "--experimental-worker", "node_modules/ep_etherpad-lite/node/server.js"]
CMD ["node", "--experimental-worker", "src/node/server.js"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Update to the latest version with `git pull origin`, then run

If cloning to a subdirectory within another project, you may need to do the following:

1. Start the server manually (e.g. `node/node_modules/ep_etherpad-lite/node/server.js`)
1. Start the server manually (e.g. `node src/node/server.js`)
2. Edit the db `filename` in `settings.json` to the relative directory with the file (e.g. `application/lib/etherpad-lite/var/dirty.db`)
3. Add auto-generated files to the main project `.gitignore`

Expand Down
28 changes: 26 additions & 2 deletions doc/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,30 @@ The variable value has to be a space separated, double quoted list of plugin nam

Some plugins will need personalized settings. Just refer to the previous section, and include them in your custom `settings.json.docker`.

### Rebuilding including export functionality for DOC/PDF/ODT

If you want to be able to export your pads to DOC/PDF/ODT files, you can install
either Abiword or Libreoffice via setting a build variable.

#### Via Abiword

For installing Abiword, set the `INSTALL_ABIWORD` build variable to any value.

Also, you will need to configure the path to the abiword executable
via setting the `abiword` property in `<BASEDIR>/settings.json.docker` to
`/usr/bin/abiword` or via setting the environment variable `ABIWORD` to
`/usr/bin/abiword`.

#### Via Libreoffice

For installing Libreoffice instead, set the `INSTALL_SOFFICE` build variable
to any value.

Also, you will need to configure the path to the libreoffice executable
via setting the `soffice` property in `<BASEDIR>/settings.json.docker` to
`/usr/bin/soffice` or via setting the environment variable `SOFFICE` to
`/usr/bin/soffice`.

### Examples

Build a Docker image from the currently checked-out code:
Expand Down Expand Up @@ -168,8 +192,8 @@ For the editor container, you can also make it full width by adding `full-width-
| `IMPORT_MAX_FILE_SIZE` | maximum allowed file size when importing a pad, in bytes. | `52428800` (50 MB) |
| `IMPORT_EXPORT_MAX_REQ_PER_IP` | maximum number of import/export calls per IP. | `10` |
| `IMPORT_EXPORT_RATE_LIMIT_WINDOW` | the call rate for import/export requests will be estimated in this time window (in milliseconds) | `90000` |
| `COMMIT_RATE_LIMIT_DURATION` | duration of the rate limit window for commits by individual users/IPs (in seconds) | `1` |
| `COMMIT_RATE_LIMIT_POINTS` | maximum number of changes per IP to allow during the rate limit window | `10` |
| `COMMIT_RATE_LIMIT_DURATION` | duration of the rate limit window for commits by individual users/IPs (in seconds) | `1` |
| `COMMIT_RATE_LIMIT_POINTS` | maximum number of changes per IP to allow during the rate limit window | `10` |
| `SUPPRESS_ERRORS_IN_PAD_TEXT` | Should we suppress errors from being visible in the default Pad Text? | `false` |
| `REQUIRE_SESSION` | If this option is enabled, a user must have a session to access pads. This effectively allows only group pads to be accessed. | `false` |
| `EDIT_ONLY` | Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. | `false` |
Expand Down
4 changes: 2 additions & 2 deletions src/bin/buildForWindows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fatal() { error "$@"; exit 1; }
is_cmd() { command -v "$@" >/dev/null 2>&1; }

# Move to the folder where ep-lite is installed
cd "$(dirname "$0")"/..
cd "$(cd "${0%/*}" && pwd -P)/../.."

# Is wget installed?
is_cmd wget || fatal "Please install wget"
Expand Down Expand Up @@ -54,7 +54,7 @@ rm -rf "$TMP_FOLDER"/src/node_modules/nodemailer/node_modules/mailcomposer/node_

log "create the zip..."
cd "$TMP_FOLDER"
zip -9 -r "$START_FOLDER"/etherpad-lite-win.zip ./*
zip -9 -r "$START_FOLDER"/etherpad-lite-win.zip ./* -x var

log "clean up..."
rm -rf "$TMP_FOLDER"
Expand Down
5 changes: 2 additions & 3 deletions src/bin/cleanRun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ rm -rf src/node_modules
src/bin/installDeps.sh "$@" || exit 1

#Move to the node folder and start
echo "Started Etherpad..."
echo "Starting Etherpad..."

SCRIPTPATH=$(pwd -P)
node $(compute_node_args) "${SCRIPTPATH}/node_modules/ep_etherpad-lite/node/server.js" "$@"
exec node $(compute_node_args) src/node/server.js "$@"
2 changes: 1 addition & 1 deletion src/bin/deb-src/sysroot/etc/init/etherpad.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ end script

script
cd $EPHOME/
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node src/node/server.js \
>> $EPLOGS/access.log \
2>> $EPLOGS/error.log
echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json"
Expand Down
2 changes: 1 addition & 1 deletion src/bin/debugRun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ echo "Open 'chrome://inspect' on Chrome to start debugging."

# Use 0.0.0.0 to allow external connections to the debugger
# (ex: running Etherpad on a docker container). Use default port # (9229)
node $(compute_node_args) --inspect=0.0.0.0:9229 node_modules/ep_etherpad-lite/node/server.js "$@"
exec node $(compute_node_args) --inspect=0.0.0.0:9229 src/node/server.js "$@"
6 changes: 3 additions & 3 deletions src/bin/doc/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bin/doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">=10.17.0"
},
"dependencies": {
"marked": "0.8.2"
"marked": "1.1.1"
},
"devDependencies": {},
"optionalDependencies": {},
Expand Down
2 changes: 1 addition & 1 deletion src/bin/fastRun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ cd "${MY_DIR}/../.." || exit 1
echo "Running directly, without checking/installing dependencies"

# run Etherpad main class
node $(compute_node_args) "node_modules/ep_etherpad-lite/node/server.js" "$@"
exec node $(compute_node_args) src/node/server.js "$@"
5 changes: 2 additions & 3 deletions src/bin/plugins/lib/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ jobs:
cd node_modules/${{github.event.repository.name}}
npm ci
# configures some settings and runs npm run test
- name: Run the backend tests
run: src/tests/frontend/travis/runnerBackend.sh
run: cd src && npm test

##ETHERPAD_NPM_V=1
##ETHERPAD_NPM_V=2
## NPM configuration automatically created using src/bin/plugins/updateAllPluginsScript.sh
Loading

0 comments on commit 65867eb

Please sign in to comment.