From b20c2fbe81999db102648eb3ed83bd83f2feb4c7 Mon Sep 17 00:00:00 2001 From: Artem Savchenko Date: Mon, 16 Feb 2026 21:50:55 +0700 Subject: [PATCH] Add instructions to deploy pulse service Signed-off-by: Artem Savchenko --- .huly.nginx | 13 +++++++++++++ README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ compose.yml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) diff --git a/.huly.nginx b/.huly.nginx index 0ee61b1..b790e6f 100644 --- a/.huly.nginx +++ b/.huly.nginx @@ -118,6 +118,19 @@ server { proxy_pass http://stats:4900/; } + #location /_pulse { + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header X-Forwarded-Proto $scheme; + # + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "upgrade"; + # rewrite ^/_pulse(/.*)$ $1 break; + # proxy_pass http://hulypulse:8099/; + #} + #location /_telegram { # proxy_set_header Host $host; # proxy_set_header X-Real-IP $remote_addr; diff --git a/README.md b/README.md index ee7a65b..8305c67 100644 --- a/README.md +++ b/README.md @@ -438,6 +438,53 @@ self-hosted Huly, perform the following steps: Note that the `LIVEKIT_HOST` should include the protocol (`wss://` by default if using livekit cloud). +## HulyPulse (Push / real-time updates) + +HulyPulse provides WebSocket push notifications and real-time updates. It requires Redis. +It will allow the following functions to work: +- The knock and invite features in video calls +- Information about who is viewing/editing objects right now +- Shows that someone is typing a message in a chat. + + +1. Enable Redis and HulyPulse in `compose.yml`: + - Uncomment the `redis` service. + - Uncomment the `hulypulse` service. + +2. Configure the `transactor` service: + + ```yaml + transactor: + ... + environment: + - PULSE_URL=http://hulypulse:8099 + ... + ``` + +3. Configure the `front` service: + + ```yaml + front: + ... + environment: + - PULSE_URL=http${SECURE:+s}://${HOST_ADDRESS}/_pulse + ... + ``` + +4. Uncomment the `/_pulse` location in `.huly.nginx` and reload nginx: + + ```bash + sudo nginx -s reload + ``` + +5. Recreate and start the stack from the `huly-selfhost` folder: + + ```bash + docker compose up -d --force-recreate + ``` + +Redis is configured with a 512 MB memory limit by default. For production you may want to set a Redis password and use `HULY_REDIS_URLS=redis://:YOUR_PASSWORD@redis:6379` in the `hulypulse` environment. The image tag uses `HULY_PULSE_VERSION` if set (default `0.1.29`). + ## Print Service 1. Add `print` container to the docker-compose.yaml diff --git a/compose.yml b/compose.yml index ff21be5..fbf1eb9 100644 --- a/compose.yml +++ b/compose.yml @@ -98,6 +98,37 @@ services: # - huly_net # # Required by aibot and calendar services + # redis: + # image: redis:7-alpine + # container_name: redis + # command: redis-server --maxmemory 512mb --maxmemory-policy allkeys-lru + # restart: unless-stopped + # networks: + # - huly_net + # # Required by HulyPulse (push notifications / real-time updates) + + # hulypulse: + # image: hardcoreeng/service_hulypulse:${HULY_PULSE_VERSION:-0.1.29} + # container_name: hulypulse + # ports: + # - 8099:8099 + # environment: + # - HULY_BIND_PORT=8099 + # - HULY_LOG=info + # - HULY_TOKEN_SECRET=${SECRET} + # - HULY_HEARTBEAT_TIMEOUT=60 + # - HULY_REDIS_MODE=direct + # - HULY_REDIS_URLS=redis://redis:6379 + # deploy: + # resources: + # limits: + # memory: 512M + # depends_on: + # - redis + # restart: unless-stopped + # networks: + # - huly_net + rekoni: image: hardcoreeng/rekoni-service:${HULY_VERSION} environment: