6e02c2d31e
- lib/bridge.js createAssetLink: POST <nextcloudUrl>/apps/richdocuments/assets (utan index.php), Content-Type application/x-www-form-urlencoded med body path=<urlencoded>, path trimmad utan ledande slash (userFolder->get relativt filrot), OCS-APIRequest borttagen. Fel inkluderar statusCode + svarskropp. - Intern collaboraUrl är HTTP: http://code:9980 (fallback http://<bridge-ip>:9980) i nc-collab-config default, .env.example, example-flows.json, docker-compose, install.sh och integrate-into-nodered.sh resolve_collabora_url. - Publik WOPI-URL dokumenterad som https://docs.domain.name. - package-lock.json för deterministisk form-data-install i Docker.
86 lines
2.7 KiB
Markdown
86 lines
2.7 KiB
Markdown
# nextcloud-collabora-nodered
|
|
|
|
Collabora / Nextcloud Office nodes for your **existing** `nextcloud-node-red` on port **1880**.
|
|
|
|
Does **not** create a new Node-RED container.
|
|
|
|
## Default: integrate (not sidecar)
|
|
|
|
**INSTALL_MODE=integrate** (default) patches and rebuilds the existing `nextcloud-node-red` on **:1880**.
|
|
No extra container, no port 1881. Sidecar only if you explicitly set `INSTALL_MODE=sidecar`.
|
|
|
|
## Quick install
|
|
|
|
```bash
|
|
curl -fsSL https://git.domain.name/your-user/nextcloud-collabora-nodered/raw/branch/main/bootstrap-install.sh | sudo -u ncdeploy bash
|
|
```
|
|
|
|
That script:
|
|
1. Clones this repo
|
|
2. Copies nodes into your `nextcloud-node-red` tree
|
|
3. Patches `Dockerfile` + `entrypoint.sh`
|
|
4. Rebuilds the **same** image and restarts the container
|
|
5. Connects Node-RED to Docker `bridge` so CODE is reachable
|
|
|
|
## Update nodes
|
|
|
|
```bash
|
|
cd /path/to/nextcloud-collabora-nodered
|
|
git pull
|
|
./install.sh
|
|
```
|
|
|
|
## Manual integration
|
|
|
|
```bash
|
|
NODERED_DIR=/path/to/nextcloud-node-red ./scripts/integrate-into-nodered.sh
|
|
```
|
|
|
|
## Sidecar :1881 (not recommended)
|
|
|
|
Only if you explicitly want a separate instance:
|
|
|
|
```bash
|
|
INSTALL_MODE=sidecar docker compose --profile sidecar up -d --build
|
|
```
|
|
|
|
## Nodes
|
|
|
|
Palette: **nextcloud collabora** — six nodes in the same purple, all wired to **nc-collab-config** (gear icon, not a flow node).
|
|
|
|
`nc-collab-config` · `collabora-bridge` · `nc-office` · `collabora-convert` · `collabora-extract` · `collabora-transform` · `collabora-wopi`
|
|
|
|
## Collabora URLs — intern vs publik
|
|
|
|
- **Intern `collaboraUrl`** (Node-RED → CODE): plain **HTTP** — `http://code:9980` när CODE delar nätverk med Node-RED, eller fallback `http://<bridge-ip>:9980` (t.ex. `172.17.0.x`) efter `docker network connect bridge nextcloud-node-red`. Aldrig HTTPS mot bridge-IP.
|
|
- **Publik `collaboraPublicUrl`** (browser/WOPI): `https://docs.domain.name` — CODE via reverse proxy.
|
|
|
|
Full guide and examples: **[docs/NODES.md](docs/NODES.md)** · import **[flows/example-flows.json](flows/example-flows.json)**
|
|
|
|
## Install on any Nextcloud VM
|
|
|
|
Copy `.env.example` → `.env` and set at least `NEXTCLOUD_URL`. The rest is auto-detected:
|
|
|
|
| Variable | Default / auto |
|
|
|----------|----------------|
|
|
| `NODERED_DIR` | compose label or common paths |
|
|
| `CODE_CONTAINER` | `code` |
|
|
| `COLLABORA_IP` | bridge IP via `docker inspect` |
|
|
| `NODERED_CONTAINER` | `nextcloud-node-red` |
|
|
| `NODERED_PORT` | `1880` |
|
|
|
|
```bash
|
|
cp .env.example .env # set NEXTCLOUD_URL for your VM
|
|
git pull
|
|
./install.sh # needs root/sudo for docker compose
|
|
```
|
|
|
|
## Repo
|
|
|
|
https://git.domain.name/your-user/nextcloud-collabora-nodered
|
|
|
|
## Documentation
|
|
|
|
- [docs/NODES.md](docs/NODES.md) — node reference and examples
|
|
- [docs/INFRASTRUCTURE.md](docs/INFRASTRUCTURE.md) — server layout
|