From 707a45a5e5be5df08edff931a2c1af354e80389b Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Wed, 9 Oct 2024 13:40:56 +0200 Subject: [PATCH] docs: Fix docker compose example in readme (fix #172) Signed-off-by: Julius Knorr --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a9729e5..188ef8c 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ occ config:app:set whiteboard collabBackendUrl --value="http://nextcloud.local:3 occ config:app:set whiteboard jwt_secret_key --value="some-random" ``` +### Running the server + #### Local node This mode requires at least Node 20 and NPM 10 to be installed. You can clone this repository, checkout the release version matching your whiteboard app. @@ -49,22 +51,12 @@ JWT_SECRET_KEY="some-random" NEXTCLOUD_URL=http://nextcloud.local npm run server #### Docker -### Building the image - -The image can be built using the following command: - -```bash -docker build -t nextcloud-whiteboard-server -``` - -### Running the server - The server requires the `NEXTCLOUD_URL` environment variable to be set to the URL of the Nextcloud instance that the Whiteboard app is installed on. The server will connect to the Nextcloud instance and listen for whiteboard events. The server can be run in a container using the following command: ```bash -docker run -e JWT_SECRET_KEY=some-random -e NEXTCLOUD_URL=https://nextcloud.local --restart unless-stopped -d ghcr.io/nextcloud-releases/whiteboard:release +docker run -e JWT_SECRET_KEY=some-random -e NEXTCLOUD_URL=https://nextcloud.local --rm ghcr.io/nextcloud-releases/whiteboard:release ``` Docker compose can also be used to run the server: @@ -76,13 +68,20 @@ services: image: ghcr.io/nextcloud-releases/whiteboard:release ports: - 3002:3002 - environment: environment: - NEXTCLOUD_URL=https://nextcloud.local - JWT_SECRET_KEY=some-random-key ``` +#### Building the image locally + +While we publish image on the GitHub container registry you can build the image locally using the following command: + +```bash +docker build -t nextcloud-whiteboard-server -f Dockerfile . +``` + ### Reverse proxy #### Apache