update README

This commit is contained in:
Nexus 2024-02-10 02:04:12 +00:00
parent 71b1a0ab36
commit 1d121fb83c
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -11,6 +11,22 @@ pip install -r requirements.txt
PREVIEW_HOMESERVER=https://example.com python3 server.py PREVIEW_HOMESERVER=https://example.com python3 server.py
``` ```
### Example docker-compose.yml
```yaml
version: "3"
services:
url_previews:
environment:
- "PREVIEW_HOMESERVER=https://matrix.nexy7574.co.uk"
ports:
- "2226:2226"
restart: "unless-stopped"
container_name: "dendrite-url-previews"
volumes:
- ./data/:/app/data/
build: . # there's no pre-built image
```
## Configuration ## Configuration
The only configuration option is `PREVIEW_HOMESERVER`, which is the homeserver to use for the previews. The only configuration option is `PREVIEW_HOMESERVER`, which is the homeserver to use for the previews.
If not specified, it defaults to the host name of the request URL, which may not work in some reverse-proxy If not specified, it defaults to the host name of the request URL, which may not work in some reverse-proxy