You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,9 +87,28 @@ Xcode - Library Path
87
87
88
88
`bash ./scripts/build.sh`
89
89
90
+
### Environment variables
91
+
92
+
The engine reads its connection configuration from the environment. The following variables are **required** — `scripts/run.sh` validates them up front and aborts if any are missing or empty:
93
+
94
+
| Variable | Used for |
95
+
| --- | --- |
96
+
|`ELASTIC_HOST`| Elasticsearch base URL that trading results are PUT to (e.g. `https://elastic.example.com:9200`) |
|`REDIS_HOST`| Redis host for the `strategy_queue` list |
100
+
101
+
I manage these secrets with [Infisical](https://infisical.com/), which injects them into the process environment at runtime, so I run the engine with:
102
+
103
+
```
104
+
infisical run -- sh ./scripts/run.sh
105
+
```
106
+
107
+
If you're not using Infisical, export the variables yourself (e.g. via your shell profile or a sourced `.env`) before invoking the script.
108
+
90
109
### Run via terminal
91
110
92
-
`bash ./scripts/run.sh` builds the project, then, if `redis-cli ping` reaches a local Redis, enqueues an inline JSON strategy via `load` and executes it via `run localhost`. If Redis is unreachable the script prints a message and exits cleanly (see `scripts/run.sh:22-25`), so first-time users without Redis still get a clear signal.
111
+
`bash ./scripts/run.sh` builds the project, then, if `redis-cli ping` reaches a local Redis, enqueues an inline JSON strategy via `load` and executes it via `run localhost`. If Redis is unreachable the script prints a message and exits cleanly (see `scripts/run.sh:22-25`), so first-time users without Redis still get a clear signal. The script requires the [environment variables](#environment-variables) listed above; with Infisical that becomes `infisical run -- sh ./scripts/run.sh`.
93
112
94
113
The `BacktestingEngine` binary exposes a subcommand CLI:
0 commit comments