-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·47 lines (42 loc) · 1.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·47 lines (42 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Tripwire — local stack for trying the daemon mode.
# docker compose up -d
# curl localhost:8080/healthz
# Use the OpenAI client of your choice with base_url=http://localhost:8080/v1
services:
tripwire:
build:
context: .
dockerfile: Dockerfile
container_name: tripwire-daemon
environment:
# Upstream LLM provider — Tripwire is provider-agnostic
OPENAI_API_KEY: "${OPENAI_API_KEY}"
ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}"
# Tripwire config
TRIPWIRE_DEFAULT_ABORT_RULES: "CONTACT_LEAK,BUSINESS_LEAK,INVESTMENT_GUARANTEE,OTP_FABRICATION,FABRICATED_ENTITY"
TRIPWIRE_DEFAULT_OBSERVE_RULES: "HALLUCINATION,LANGUAGE_MISMATCH,WORD_CAP"
TRIPWIRE_LOG_LEVEL: "info"
# Optional observability
SENTRY_DSN: "${SENTRY_DSN:-}"
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
interval: 20s
timeout: 3s
retries: 3
start_period: 8s
restart: unless-stopped
# Optional example client — a tiny Next.js page that demonstrates the abort UX
demo:
profiles: ["demo"] # docker compose --profile demo up
image: ghcr.io/ykstorm/tripwire-demo:latest
container_name: tripwire-demo
environment:
OPENAI_BASE_URL: "http://tripwire:8080/v1"
OPENAI_API_KEY: "${OPENAI_API_KEY}"
ports:
- "3000:3000"
depends_on:
tripwire:
condition: service_healthy