chat/.env.example
Ali Asadi 0d262c68eb Send push notifications on new chat messages
Ports the gooyal notifications client (as already used by advertising)
and wires it into the previously-empty PushPublisher: on each message
send, the other conversation participant(s) get a push notification
with the sender's name and a message preview. Failures are swallowed
per-recipient so a down notifications service degrades silently rather
than breaking message sending.

Requires NOTIFICATIONS_BASE_PUBLIC_URL and the
notifications.application.push:send OAuth2 scope to be configured
before it will actually deliver.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-01 14:10:56 +03:30

54 lines
1.9 KiB
Text

# Database
DB_NAME=gooyal_chat
DB_USER=postgres
DB_HOST=127.0.0.1
DB_PASSWORD=
DB_PORT=5432
DEBUG=true
# OAuth2 / SSO provider
OAUTH2_PROVIDER_BASE_PUBLIC_URL=https://accounts.example.com/oauth2
OAUTH2_PROVIDER_BASE_PRIVATE_URL=https://accounts.example.com/oauth2
OAUTH2_PROVIDER_CLIENT_ID=
OAUTH2_PROVIDER_CLIENT_SECRET=
# Must include accounts.profile:retrieve for the accounts client (see ACCOUNTS_BASE_PUBLIC_URL)
# and notifications.application.push:send for the notifications client (see NOTIFICATIONS_BASE_PUBLIC_URL)
OAUTH2_PROVIDER_SCOPES=
# Gooyal Accounts service — used to fetch public user profiles (name, avatar) for chat responses
ACCOUNTS_BASE_PUBLIC_URL=https://accounts.example.com
# Gooyal Notifications service — used to push a notification to the other participant(s) when a message is sent
NOTIFICATIONS_BASE_PUBLIC_URL=https://notifications.example.com
# Redis (used for cache, channel layer, and long-poll)
REDIS_BASE_URL=redis://127.0.0.1:6379/1
# Mattermost
# MATTERMOST_TOKEN must be a Personal Access Token (not a session token — session tokens expire)
# Enable at: System Console → Integrations → Integration Management → Enable Personal Access Tokens
MATTERMOST_URL=https://chat.example.com
MATTERMOST_TOKEN=
MATTERMOST_TEAM_ID=
MATTERMOST_SERVICE_USERNAME=chat-service
MATTERMOST_SERVICE_EMAIL=chat-service@local.invalid
# MinIO object storage
# The frontend uploads media directly to MinIO and sends us only the
# resulting object key — these credentials are used solely to sign
# short-lived download URLs when messages are read back.
MINIO_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_BUCKET_CHAT=chat
MINIO_SECURE=false
MINIO_PRESIGN_EXPIRY_SECONDS=3600
# Chat long-poll tuning
CHAT_LONG_POLL_TIMEOUT_SECONDS=25
CHAT_LONG_POLL_INTERVAL_SECONDS=1
# Native library paths (macOS Homebrew — leave empty on Linux)
GDAL_LIBRARY_PATH=
GEOS_LIBRARY_PATH=