CLAUDE.md: cached context file covering project identity, tech stack, codebase map, schema quick-ref, API gotchas, fix history, working rules, fleet state, and open items. Structured for maximum cache efficiency — stable content first, dynamic state at the end. docs/CONNECTIONS.md: connection parameter shapes (no secrets) for SSH, DB, API, container resolution, Forgejo, Grafana, n8n. docs/PROJECT_CONTEXT.md: client business context (telco field service, 3 cities, service types), data quality gaps, KPI framework by domain, integration roadmap. docs/KPI_FRAMEWORK.md: living KPI register with status tracking, thresholds, client feedback log, and review checklist. To be co-developed with client iteratively. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
111 lines
2.5 KiB
Markdown
111 lines
2.5 KiB
Markdown
# Connection Parameters Reference
|
|
|
|
**No secrets are stored here. All values come from `.env` at runtime.**
|
|
|
|
---
|
|
|
|
## SSH
|
|
|
|
```
|
|
Host: stage.rahamafresh.com
|
|
User: kianiadee
|
|
Key: ~/.ssh/id_ed25519
|
|
```
|
|
|
|
```bash
|
|
ssh -i ~/.ssh/id_ed25519 kianiadee@stage.rahamafresh.com
|
|
```
|
|
|
|
---
|
|
|
|
## Database
|
|
|
|
| Parameter | Value |
|
|
|---|---|
|
|
| Database | `tracksolid_db` |
|
|
| Host (internal) | `timescale_db` (Docker service name) |
|
|
| Port | `5432` |
|
|
| App user | `tracksolid_owner` |
|
|
| Read-only user | `grafana_ro` |
|
|
| Superuser | `postgres` |
|
|
|
|
### `.env` variable names
|
|
|
|
```
|
|
POSTGRES_DB=tracksolid_db
|
|
POSTGRES_USER=...
|
|
POSTGRES_PASSWORD=...
|
|
DATABASE_URL=postgresql://tracksolid_owner:<password>@timescale_db:5432/tracksolid_db
|
|
GRAFANA_DB_RO_PASSWORD=...
|
|
```
|
|
|
|
### Run a query from host
|
|
|
|
```bash
|
|
DB=$(docker ps --filter name=timescale_db --format "{{.Names}}" | head -1)
|
|
docker exec $DB psql -U postgres -d tracksolid_db -c "SELECT COUNT(*) FROM tracksolid.devices;"
|
|
```
|
|
|
|
### Run a query file
|
|
|
|
```bash
|
|
docker exec -i $DB psql -U postgres -d tracksolid_db < migration.sql
|
|
```
|
|
|
|
---
|
|
|
|
## Tracksolid Pro API
|
|
|
|
| Parameter | Env var |
|
|
|---|---|
|
|
| App key | `TRACKSOLID_APP_KEY` |
|
|
| App secret | `TRACKSOLID_APP_SECRET` |
|
|
| User ID | `TRACKSOLID_USER_ID` |
|
|
| Target account | `TRACKSOLID_TARGET_ACCOUNT` (defaults to USER_ID) |
|
|
| Password MD5 | `TRACKSOLID_PWD_MD5` |
|
|
| Base URL | `TRACKSOLID_API_URL` (default: `https://eu-open.tracksolidpro.com/route/rest`) |
|
|
|
|
---
|
|
|
|
## Container Name Resolution
|
|
|
|
Coolify appends a random suffix to all container names. Never hardcode. Always resolve:
|
|
|
|
```bash
|
|
# Pattern
|
|
docker ps --filter name=<service_name> --format "{{.Names}}" | head -1
|
|
|
|
# Examples
|
|
docker ps --filter name=timescale_db --format "{{.Names}}" | head -1
|
|
docker ps --filter name=ingest_movement --format "{{.Names}}" | head -1
|
|
docker ps --filter name=webhook_receiver --format "{{.Names}}" | head -1
|
|
docker ps --filter name=grafana --format "{{.Names}}" | head -1
|
|
```
|
|
|
|
Current suffix (may change on redeploy): `bo3nov2ija7g8wn9b1g2paxs-19xxxxxxxxxx`
|
|
|
|
---
|
|
|
|
## Forgejo
|
|
|
|
```
|
|
Host: https://repo.rahamafresh.com
|
|
Repo: kianiadee/tracksolid_timescale_grafana_prod
|
|
Remote: https://repo.rahamafresh.com/kianiadee/tracksolid_timescale_grafana_prod.git
|
|
```
|
|
|
|
---
|
|
|
|
## Grafana
|
|
|
|
- Deployed as Docker service `grafana`
|
|
- Provisioning baked into image (datasources + dashboards via `grafana/Dockerfile`)
|
|
- Admin password: `GF_SECURITY_ADMIN_PASSWORD` from `.env`
|
|
- Default dashboard: NOC Fleet Dashboard
|
|
|
|
---
|
|
|
|
## n8n
|
|
|
|
- Deployed as separate Coolify service (`n8n-usoksgg8o40044g0cw08s8wc`)
|
|
- Workflows exported to `n8n-workflows/`
|