4b6817381b
Benchmark image — build + push to ECR (any adapter) / build + push (push) Waiting to run
CI / quality (ubuntu-latest) (push) Waiting to run
CI / test (tools-runtime) (push) Waiting to run
CI / test (e2e-general) (push) Waiting to run
CI / test (cli-runtime) (push) Waiting to run
CI / test (e2e-provider-and-openclaw) (push) Waiting to run
CI / test (integrations-and-misc) (push) Waiting to run
CI / coverage-report (push) Blocked by required conditions
CI / test-kubernetes (push) Waiting to run
CI / should-run-thorough (push) Waiting to run
CI / test-thorough (cloudwatch-demo) (push) Blocked by required conditions
CI / test-thorough (flink-ecs) (push) Blocked by required conditions
CI / test-thorough (upstream-lambda) (push) Blocked by required conditions
CI / test-thorough (prefect-ecs-fargate) (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Blocked by required conditions
Release / publish-release (push) Blocked by required conditions
Release / publish-main-release (push) Blocked by required conditions
Release / prepare (push) Waiting to run
Release / verify (push) Blocked by required conditions
Release / build-python-dist (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Blocked by required conditions
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Waiting to run
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
122 lines
3.7 KiB
Plaintext
122 lines
3.7 KiB
Plaintext
---
|
|
title: "Deployment"
|
|
slug: "deployment"
|
|
description: "Deploy OpenSRE as a standard Python/FastAPI runtime"
|
|
---
|
|
|
|
OpenSRE deploys as a standard Python/FastAPI runtime. Use the repo `Dockerfile`,
|
|
Railway, EC2, ECS, Vercel, or another ASGI-capable host.
|
|
|
|
## Runtime environment
|
|
|
|
<Steps>
|
|
<Step title="Deploy the app">
|
|
Deploy this repository using your hosting provider's normal app workflow.
|
|
</Step>
|
|
|
|
<Step title="Configure your model provider">
|
|
Add `LLM_PROVIDER` as an environment variable (for example `anthropic`,
|
|
`openai`, `openrouter`, or `gemini`).
|
|
</Step>
|
|
|
|
<Step title="Add the matching provider API key">
|
|
Use the API key that matches your provider:
|
|
|
|
- `ANTHROPIC_API_KEY` for `LLM_PROVIDER=anthropic`
|
|
- `OPENAI_API_KEY` for `LLM_PROVIDER=openai`
|
|
- `OPENROUTER_API_KEY` for `LLM_PROVIDER=openrouter`
|
|
- `DEEPSEEK_API_KEY` for `LLM_PROVIDER=deepseek`
|
|
- `GEMINI_API_KEY` for `LLM_PROVIDER=gemini`
|
|
|
|
</Step>
|
|
|
|
<Step title="Add integration env vars and deploy">
|
|
Add any storage and integration environment variables required by your runtime, then deploy and verify health.
|
|
</Step>
|
|
</Steps>
|
|
|
|
Minimum LLM environment example:
|
|
|
|
```bash
|
|
LLM_PROVIDER=anthropic
|
|
ANTHROPIC_API_KEY=...
|
|
```
|
|
|
|
The complete list of provider keys and optional model overrides is documented in `.env.example`.
|
|
|
|
## Prebuilt Docker image
|
|
|
|
Public images are published to GitHub Container Registry for every release
|
|
(`linux/amd64` and `linux/arm64`), so you can skip building from source.
|
|
|
|
| Tag | What it is |
|
|
| --- | --- |
|
|
| `ghcr.io/tracer-cloud/opensre:latest` | Most recent release |
|
|
| `ghcr.io/tracer-cloud/opensre:<version>` | A specific release, e.g. `0.1.2026.7.8` (matches the GitHub release tag without the `v`) |
|
|
|
|
```bash
|
|
docker pull ghcr.io/tracer-cloud/opensre:latest
|
|
|
|
# Web mode (FastAPI health app, default)
|
|
docker run -p 8000:8000 --env-file .env ghcr.io/tracer-cloud/opensre:latest
|
|
|
|
# Gateway mode (Telegram two-way messaging gateway)
|
|
docker run -e MODE=gateway --env-file .env ghcr.io/tracer-cloud/opensre:latest
|
|
```
|
|
|
|
## Run local gateway
|
|
|
|
Use the built-in gateway command when you want a local HTTP server for investigations.
|
|
|
|
| Command | What it does |
|
|
| --- | --- |
|
|
| `uv run opensre gateway start` | Starts the gateway daemon in the background (web app, Telegram chat, task scheduler). |
|
|
| `uv run opensre gateway start --foreground` | Runs the gateway attached to this terminal. |
|
|
| `uv run opensre gateway stop` | Stops the background daemon. |
|
|
| `uv run opensre gateway status` | Shows daemon and component status. |
|
|
|
|
The web app binds `0.0.0.0` on the port from the `PORT` environment variable
|
|
(default `8000`).
|
|
|
|
Quick local checks:
|
|
|
|
```bash
|
|
curl http://127.0.0.1:8000/ok
|
|
```
|
|
|
|
Example investigation request:
|
|
|
|
```bash
|
|
curl -X POST http://127.0.0.1:8000/investigate \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"raw_alert": {
|
|
"alert_name": "etl-daily-orders-failure",
|
|
"pipeline_name": "etl_daily_orders",
|
|
"severity": "critical",
|
|
"message": "Orders pipeline failed with timeout."
|
|
}
|
|
}'
|
|
```
|
|
|
|
By default, `/investigate` (like `/alerts`) accepts only loopback callers. Set
|
|
`OPENSRE_ALERT_LISTENER_TOKEN` to allow remote callers with a bearer token:
|
|
|
|
```bash
|
|
curl -X POST http://127.0.0.1:8000/investigate \
|
|
-H "Content-Type: application/json" \
|
|
-H "Authorization: Bearer $OPENSRE_ALERT_LISTENER_TOKEN" \
|
|
-d '{"raw_alert":{"alert_name":"test"}}'
|
|
```
|
|
|
|
## Railway deployment
|
|
|
|
Railway is still supported as a hosted runtime option.
|
|
|
|
Before deploying on Railway, make sure your service has:
|
|
|
|
- `DATABASE_URI` pointing to your Railway Postgres instance
|
|
- `REDIS_URI` pointing to your Railway Redis instance
|
|
|
|
Then deploy the service using your Railway project workflow.
|