feat(channels): add Shangwutong connector
This commit is contained in:
@@ -98,6 +98,40 @@ services:
|
||||
memory: 512M
|
||||
cpus: '1.0'
|
||||
|
||||
shangwutong:
|
||||
image: gochat/shangwutong:${SHANGWUTONG_VERSION:-latest}
|
||||
container_name: gochat-shangwutong
|
||||
restart: always
|
||||
stop_grace_period: ${SWT_SHUTDOWN_TIMEOUT:-30s}
|
||||
environment:
|
||||
SWT_CONNECTOR_LISTEN: :9100
|
||||
SWT_CONNECTOR_DB_PATH: /data/connector.db
|
||||
GOCHAT_BASE_URL: http://gochat:3000
|
||||
GOCHAT_CONNECTOR_SERVICE_TOKEN: ${GOCHAT_CONNECTOR_SERVICE_TOKEN:-}
|
||||
SWT_MAX_INFLIGHT_HEARTBEATS: ${SWT_MAX_INFLIGHT_HEARTBEATS:-64}
|
||||
SWT_INBOUND_WORKERS: ${SWT_INBOUND_WORKERS:-8}
|
||||
SWT_OUTBOUND_WORKERS: ${SWT_OUTBOUND_WORKERS:-8}
|
||||
SWT_SHUTDOWN_TIMEOUT: ${SWT_SHUTDOWN_TIMEOUT:-30s}
|
||||
volumes:
|
||||
- shangwutong_data:/data
|
||||
- shangwutong_backups:/backup
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-T", "3", "-O", "/dev/null", "http://127.0.0.1:9100/readyz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 15s
|
||||
retries: 3
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 512M
|
||||
cpus: '1.0'
|
||||
reservations:
|
||||
memory: 128M
|
||||
cpus: '0.25'
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
shangwutong_data:
|
||||
shangwutong_backups:
|
||||
|
||||
@@ -32,3 +32,10 @@ GOCHAT_SEED_ADMIN_PASSWORD=changeme
|
||||
GOCHAT_SEED_ADMIN_NAME=Super Admin
|
||||
GOCHAT_SEED_ACCOUNT_NAME=Quickstart Account
|
||||
GOCHAT_SEED_INBOX_NAME=Quickstart Website Inbox
|
||||
|
||||
# Required only when starting: docker compose --profile shangwutong up
|
||||
GOCHAT_CONNECTOR_SERVICE_TOKEN=
|
||||
SWT_MAX_INFLIGHT_HEARTBEATS=64
|
||||
SWT_INBOUND_WORKERS=8
|
||||
SWT_OUTBOUND_WORKERS=8
|
||||
SWT_SHUTDOWN_TIMEOUT=30s
|
||||
|
||||
@@ -125,8 +125,35 @@ services:
|
||||
command: ["seed"]
|
||||
restart: "no"
|
||||
|
||||
shangwutong:
|
||||
profiles: ["shangwutong"]
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: channels/shangwutong/Dockerfile
|
||||
restart: unless-stopped
|
||||
stop_grace_period: ${SWT_SHUTDOWN_TIMEOUT:-30s}
|
||||
environment:
|
||||
SWT_CONNECTOR_LISTEN: :9100
|
||||
SWT_CONNECTOR_DB_PATH: /data/connector.db
|
||||
GOCHAT_BASE_URL: http://gochat:3000
|
||||
GOCHAT_CONNECTOR_SERVICE_TOKEN: ${GOCHAT_CONNECTOR_SERVICE_TOKEN:-}
|
||||
SWT_MAX_INFLIGHT_HEARTBEATS: ${SWT_MAX_INFLIGHT_HEARTBEATS:-64}
|
||||
SWT_INBOUND_WORKERS: ${SWT_INBOUND_WORKERS:-8}
|
||||
SWT_OUTBOUND_WORKERS: ${SWT_OUTBOUND_WORKERS:-8}
|
||||
SWT_SHUTDOWN_TIMEOUT: ${SWT_SHUTDOWN_TIMEOUT:-30s}
|
||||
volumes:
|
||||
- shangwutong-data:/data
|
||||
- shangwutong-backups:/backup
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-T", "3", "-O", "/dev/null", "http://127.0.0.1:9100/readyz"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
redis-data:
|
||||
meili-data:
|
||||
gochat-storage:
|
||||
shangwutong-data:
|
||||
shangwutong-backups:
|
||||
|
||||
Reference in New Issue
Block a user