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
Add separate README instructions for manual Docker and Docker
Compose flows, and update teardown commands to match the
observed behavior of optional profile services.
Add the compose and migration artifacts required by the
documented workflow, tighten Docker build ignores, and fix a
near-indexer Clippy issue hit during pre-commit validation.
docker compose --profile telegram up -d telegram-indexer
245
+
```
246
+
247
+
Useful checks:
248
+
249
+
```bash
250
+
docker compose ps
251
+
docker compose logs -f migrate api web
252
+
curl http://127.0.0.1:3000/health
253
+
curl http://127.0.0.1:3001/health
254
+
```
255
+
256
+
Stop the stack:
257
+
258
+
```bash
259
+
# Include the optional profiles so any profile containers you started are removed too.
260
+
docker compose --profile discourse --profile near --profile telegram down
261
+
docker compose --profile discourse --profile near --profile telegram down -v
262
+
```
263
+
264
+
Notes for this compose stack:
265
+
266
+
- The compose file intentionally uses `COMPOSE_DATABASE_URL` instead of inheriting the root `.env``DATABASE_URL`. That avoids accidentally pointing containers at a host-local database.
267
+
-`web/.env.local` is excluded from Docker build context, so local frontend env files no longer leak into image builds.
268
+
- The `near-indexer` profile lowers FastNEAR fetch threads to `2` by default. It still benefits from `FASTNEAR_API_KEY`, or you can switch to `NEAR_PROVIDER=lake`.
269
+
- The `telegram-indexer` profile stores session state in the `telegram-session` named volume via `TELEGRAM_SESSION_FILE=/var/lib/telegram/telegram_session.bin`.
270
+
77
271
### Recommended deployment sequence
78
272
79
273
1. Provision PostgreSQL and set `DATABASE_URL` for every Rust service.
80
-
2. Run migrations before starting the API or any indexer.
274
+
2. Run the `migration` container before starting the API or any indexer.
81
275
3. Deploy `api` and verify `/health` before attaching downstream services.
82
276
4. Deploy `web` with `VENEAR_API_BASE_URL` pointed at the API's reachable URL.
83
277
5. Deploy only the indexers you need for your data coverage.
84
278
6. Validate logs, health checks, and database connectivity after each rollout.
85
279
86
280
### Minimum runtime configuration
87
281
88
-
- Shared Rust services: `DATABASE_URL`, optional `RUST_LOG`, `SERVICE_VERSION`, and `DEPLOYMENT_ENVIRONMENT`
282
+
- Shared Rust services: `DATABASE_URL`
283
+
- Common optional overrides: `APP_LOGGING__LEVEL`, `APP_LOGGING__FORMAT`, `APP_TELEMETRY__ENVIRONMENT`, and `APP_TELEMETRY__SERVICE_VERSION`
89
284
- API: optional `PORT` or `APP_SERVER__PORT`
90
285
- Web: `VENEAR_API_BASE_URL` or `NEXT_PUBLIC_VENEAR_API_BASE_URL`
91
286
- Telegram indexer: `TELEGRAM_API_ID`, `TELEGRAM_API_HASH`, `TELEGRAM_CHANNELS`, and either `TELEGRAM_SESSION_DATA` or persistent storage for `TELEGRAM_SESSION_FILE`
92
-
- NEAR indexer: optional FastNEAR credentials when you use the FastNEAR provider
287
+
- NEAR indexer: optional `FASTNEAR_API_KEY`, or set `APP_NEAR__PROVIDER=lake` if you do not want FastNEAR
93
288
94
289
### Operational notes
95
290
96
291
- The API `/health` endpoint is useful for liveness, but it still returns HTTP 200 with a `degraded` payload when the database is unavailable. Treat it as a basic health signal, not your only database readiness gate.
97
292
- The Telegram indexer defaults to a local `telegram_session.bin` file. In ephemeral container platforms, provide `TELEGRAM_SESSION_DATA` or attach durable storage so redeploys do not force re-authentication.
98
293
- The worker services are background jobs, not HTTP apps. They should rely on restart-on-failure policies, logs, and telemetry rather than path-based health checks.
294
+
- The NEAR and Discourse workers can hit upstream rate limits during initial backfills. For production rollouts, expect to tune concurrency and provider credentials rather than treating the defaults as infinite-throughput settings.
99
295
100
296
### Deployment artifacts in this repo
101
297
298
+
-`compose`: `/compose.yml`
102
299
-`api`: `/api/Dockerfile` and `/api/railway.toml`
103
300
-`web`: `/web/Dockerfile` and `/web/railway.toml`
301
+
-`migration`: `/migration/Dockerfile`
104
302
-`discourse-indexer`: `/indexers/discourse-indexer/Dockerfile` and `/indexers/discourse-indexer/railway.toml`
105
303
-`near-indexer`: `/indexers/near-indexer/Dockerfile` and `/indexers/near-indexer/railway.toml`
106
304
-`telegram-indexer`: `/indexers/telegram-indexer/Dockerfile` and `/indexers/telegram-indexer/railway.toml`
0 commit comments