From ac80380a816b33c89f054d782ef1226b340c609f Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 16 Jul 2026 04:07:47 +0000 Subject: [PATCH] Fix etherpad_dev based on AGENTS.md --- etherpad_dev/README.md | 73 +++++++++++++++++++++++++++++++-- etherpad_dev/compose.yaml | 28 +++++++++++++ etherpad_dev/docker-compose.yml | 1 - etherpad_dev/sample.env | 12 +++++- 4 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 etherpad_dev/compose.yaml delete mode 100644 etherpad_dev/docker-compose.yml diff --git a/etherpad_dev/README.md b/etherpad_dev/README.md index 248b99e..fbf3cff 100644 --- a/etherpad_dev/README.md +++ b/etherpad_dev/README.md @@ -1,7 +1,72 @@ -# etherpad +# Etherpad -[website](https://etherpad.org/) +## Overview -Etherpad is a highly customizable open source online editor providing collaborative editing in really real-time. +Etherpad is a highly customizable open source online editor providing collaborative editing in real-time. It's perfect for collaborative work sessions, note-taking, and document creation. -TODO: this looks like a great project. +## Project Details + +- **Project Repository:** https://github.com/etherpad/etherpad-lite +- **Container Image:** [Docker Hub](https://hub.docker.com/_/node) +- **Compose Example:** [Etherpad Docker Compose](https://github.com/etherpad/etherpad-lite/blob/master/docker-compose.yml) +- **Documentation:** [Etherpad Docs](https://etherpad.org/documentation/) +- **Reverse Proxy Port:** `9001` + +## Getting Started + +1. Start the container: `docker compose up -d` +2. Access Etherpad: `http://localhost:9001` +3. Log in with admin/etherpad (default credentials) + +## Environment Variable Notes + +- `ETHERPAD_IMAGE` – Docker image to use (default: `node:18-slim`) +- `ETHERPAD_PORT` – Port to expose (default: `9001`) +- `ETHERPAD_RESTART` – Restart policy (default: `unless-stopped`) +- `TZ` – Timezone for container (default: `UTC`) +- `ETHERPAD_DEFAULT_TITLE` – Default title for new pads (default: `Etherpad`) +- `ETHERPAD_DEFAULT_TEXT` – Default welcome text for new pads (default: `Welcome to Etherpad!`) +- `ETHERPAD_ADMIN_PASSWORD` – Admin password for authentication (default: `admin`) + +## Volume Notes + +- `/data` – Persistent storage for Etherpad configuration and data files + +## Network Notes + +Requires proxy network + +## Docker Run + +```bash +docker run -d \ + --name etherpad \ + -e ETHERPAD_IMAGE=node:18-slim \ + -e ETHERPAD_PORT=9001 \ + -e ETHERPAD_RESTART=unless-stopped \ + -e TZ=UTC \ + -e ETHERPAD_DEFAULT_TITLE=Etherpad \ + -e ETHERPAD_DEFAULT_TEXT=Welcome to Etherpad! \ + -e ETHERPAD_ADMIN_PASSWORD=admin \ + -v /data/etherpad:/home/etherpad \ + -p 9001:9001 \ + node:18-slim +``` + +## Additional Notes / Gotchas + +- Etherpad requires curl and git to be installed in the container for initial setup +- After container starts, you can access the WebSocket port at 9001 for real-time collaboration +- Change the admin password immediately after first login +- The docker image installs Etherpad from GitHub source + +## Dockhand Stack, Deploy from Git + +Cookbooks Repository +stackname: etherpad +Compose file path: etherpad_dev/compose.yaml +Additional env file (optional): etherpad_dev/sample.env + +Then "Load" etherpad_dev/sample.env into the Environmental variables in dockhand + +Create the Stack diff --git a/etherpad_dev/compose.yaml b/etherpad_dev/compose.yaml new file mode 100644 index 0000000..ed20621 --- /dev/null +++ b/etherpad_dev/compose.yaml @@ -0,0 +1,28 @@ +services: + etherpad: + image: ${ETHERPAD_IMAGE:-node:18-slim} + restart: ${ETHERPAD_RESTART:-unless-stopped} + command: + - docker-entrypoint.sh + - /bin/bash + - -c + - "npm install -g git+https://github.com/etherpad/etherpad-lite.git && cp -r /usr/local/lib/node_modules/etherpad-lite/* /home/etherpad/ && chmod -R 775 /home/etherpad/ && ls -la /home/etherpad/" + environment: + - TZ=${TZ:-UTC} + - ETHERPAD_DEFAULT_TITLE=${ETHERPAD_DEFAULT_TITLE:-Etherpad} + - ETHERPAD_DEFAULT_TEXT=${ETHERPAD_DEFAULT_TEXT:-Welcome to Etherpad!} + - ETHERPAD_ADMIN_PASSWORD=${ETHERPAD_ADMIN_PASSWORD:-admin} + ports: + - "${ETHERPAD_PORT:-9001}:9001" + volumes: + - ${VOL_PATH:-/data}/etherpad:/home/etherpad + - /etc/localtime:/etc/localtime:ro + networks: + - proxy + - internal + +networks: + proxy: + external: true + internal: + internal: true \ No newline at end of file diff --git a/etherpad_dev/docker-compose.yml b/etherpad_dev/docker-compose.yml deleted file mode 100644 index 9e4a3f5..0000000 --- a/etherpad_dev/docker-compose.yml +++ /dev/null @@ -1 +0,0 @@ -services: \ No newline at end of file diff --git a/etherpad_dev/sample.env b/etherpad_dev/sample.env index e61251c..96996e0 100644 --- a/etherpad_dev/sample.env +++ b/etherpad_dev/sample.env @@ -1 +1,11 @@ -# Global \ No newline at end of file +COOKBOOK=/git/docker-compose-cookbooks #HELP: cookbooks +VOL_PATH=/data +TZ=UTC + +# etherpad +ETHERPAD_IMAGE=node:18-slim +ETHERPAD_PORT=9001 +ETHERPAD_RESTART=unless-stopped +ETHERPAD_DEFAULT_TITLE=Etherpad +ETHERPAD_DEFAULT_TEXT=Welcome to Etherpad! +ETHERPAD_ADMIN_PASSWORD=admin \ No newline at end of file