Skip to content

Commit 83cc59f

Browse files
committed
chore: improve s2-lite local-dev onboarding
Adds a commented s2-lite block to .env.example so contributors know how to enable v2 streams (Sessions / chat.agent) against the existing `s2` docker service, and drops the broken healthcheck on the distroless s2-lite image that always reports unhealthy.
1 parent 05d3ab1 commit 83cc59f

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ REDIS_TLS_DISABLED="true"
2929
DEV_OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:3030/otel"
3030
DEV_OTEL_BATCH_PROCESSING_ENABLED="0"
3131

32+
# Realtime streams v2 (Sessions, chat.agent, large stream backfills) backed
33+
# by S2 (https://s2.dev). The `s2` service in docker/docker-compose.yml runs
34+
# the open-source s2-lite binary and pre-creates a basin named `trigger-local`
35+
# (see docker/config/s2-spec.json). Comment these out to fall back to v1
36+
# (Redis-only) streams; Sessions and chat.agent then become unavailable.
37+
REALTIME_STREAMS_S2_BASIN=trigger-local
38+
REALTIME_STREAMS_S2_ACCESS_TOKEN=ignored
39+
REALTIME_STREAMS_S2_ENDPOINT=http://localhost:4566/v1
40+
REALTIME_STREAMS_S2_SKIP_ACCESS_TOKENS=true
41+
REALTIME_STREAMS_DEFAULT_VERSION=v2
42+
3243
# When the domain is set to `localhost` the CLI deploy command will only --load the image by default and not --push it
3344
DEPLOY_REGISTRY_HOST=localhost:5000
3445

docker/docker-compose.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ services:
184184
networks:
185185
- app_network
186186

187+
# s2-lite: open-source S2 (https://s2.dev) for local realtime streams v2.
188+
# The image is distroless (no shell), so a `wget` / `curl` healthcheck
189+
# always reports unhealthy even when the API is responding. No other
190+
# service depends on this one, so the healthcheck is omitted.
187191
s2:
188192
image: ghcr.io/s2-streamstore/s2
189193
command: ["lite", "--init-file", "/s2-spec.json"]
@@ -193,12 +197,6 @@ services:
193197
- "4566:80"
194198
networks:
195199
- app_network
196-
healthcheck:
197-
test: ["CMD-SHELL", "wget -qO- http://localhost:80/v1/basins?limit=1 || exit 1"]
198-
interval: 2s
199-
timeout: 3s
200-
retries: 5
201-
start_period: 3s
202200

203201
toxiproxy:
204202
container_name: toxiproxy

0 commit comments

Comments
 (0)