etherpad-lite: Start of docker image fails with error Cannot find module 'log4js' with DB_TYPE=sqlite
Describe the bug We upgraded to the latest etherpad release and now our etherpad installation refuses to start correctly. It fails with the following error:
etherpad | Error: Cannot find module 'log4js'
etherpad | Require stack:
etherpad | - /opt/etherpad-lite/src/node/server.js
etherpad | at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
etherpad | at Module._load (node:internal/modules/cjs/loader:920:27)
etherpad | at Module.require (node:internal/modules/cjs/loader:1141:19)
etherpad | at require (node:internal/modules/cjs/helpers:110:18)
etherpad | at Object.<anonymous> (/opt/etherpad-lite/src/node/server.js:27:16)
etherpad | at Module._compile (node:internal/modules/cjs/loader:1254:14)
etherpad | at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
etherpad | at Module.load (node:internal/modules/cjs/loader:1117:32)
etherpad | at Module._load (node:internal/modules/cjs/loader:958:12)
etherpad | at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
etherpad | code: 'MODULE_NOT_FOUND',
etherpad | requireStack: [ '/opt/etherpad-lite/src/node/server.js' ]
etherpad | }
To Reproduce Steps to reproduce the behavior:
- We use the following docker compose file
version: "3.7"
services:
etherpad:
image: etherpad/etherpad
container_name: etherpad
volumes:
- type: bind
source: TRUNCATED/etherpad/pads.db
target: /opt/etherpad-lite/var/pads.db
environment:
- TITLE=TRUNCATED
- DB_TYPE=sqlite
- DB_FILENAME=var/pads.db
- API_KEY=${ETHERPAD_API_KEY}
- ADMIN_PASSWORD=${ETHERPAD_ADMIN_PASSWORD}
- ADMIN_USER=TRUNCATED
ports:
- 127.0.0.1:13080:9001
restart: unless-stopped
command: bash -c "npm install sqlite3 && node src/node/server.js"
- Run
docker-compose up
- Wait for the error
Expected behavior The docker container starts up normally.
Screenshots
Server (please complete the following information):
- Etherpad version: Latest tag
- OS: Docker Image
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (9 by maintainers)
thanks for your help! The command we finally ended up using was
/bin/sh -c "cd src && npm install sqlite3 && etherpad"
Everything is working as intended now.Closing as the issue is resolved. If you need more help. Just reopen the issue or comment here.