@emeryld/obs-stack
Advanced tools
+5
-4
@@ -9,2 +9,3 @@ #!/usr/bin/env node | ||
| const ROOT = path.resolve(__dirname, '..'); | ||
| const WORKSPACE_ROOT = path.resolve(ROOT, '..', '..'); | ||
| const ROOT_ENV_PATH = path.join(ROOT, '.env'); | ||
@@ -63,4 +64,4 @@ | ||
| ensureDocker(); | ||
| const child = spawn('docker', ['compose', '-f', COMPOSE_FILE, ...args], { | ||
| cwd: ROOT, | ||
| const child = spawn('docker', ['compose', '--project-directory', WORKSPACE_ROOT, '-f', COMPOSE_FILE, ...args], { | ||
| cwd: WORKSPACE_ROOT, | ||
| stdio: options.stdio ?? 'inherit', | ||
@@ -84,4 +85,4 @@ env: process.env | ||
| ensureDocker(); | ||
| const child = spawn('docker', ['compose', '-f', COMPOSE_FILE, ...args], { | ||
| cwd: ROOT, | ||
| const child = spawn('docker', ['compose', '--project-directory', WORKSPACE_ROOT, '-f', COMPOSE_FILE, ...args], { | ||
| cwd: WORKSPACE_ROOT, | ||
| stdio: 'inherit', | ||
@@ -88,0 +89,0 @@ env: process.env |
@@ -12,3 +12,3 @@ services: | ||
| - grafana-data:/var/lib/grafana | ||
| - ./grafana/provisioning:/etc/grafana/provisioning | ||
| - ./packages/obs-stack/grafana/provisioning:/etc/grafana/provisioning | ||
| depends_on: | ||
@@ -27,3 +27,3 @@ - loki | ||
| volumes: | ||
| - ./configs/tempo.yaml:/etc/tempo/local-config.yaml:ro | ||
| - ./packages/obs-stack/configs/tempo.yaml:/etc/tempo/local-config.yaml:ro | ||
| - tempo-data:/var/tempo | ||
@@ -40,3 +40,3 @@ restart: unless-stopped | ||
| volumes: | ||
| - ./configs/loki.yaml:/etc/loki/local-config.yaml:ro | ||
| - ./packages/obs-stack/configs/loki.yaml:/etc/loki/local-config.yaml:ro | ||
| - loki-data:/var/loki | ||
@@ -54,3 +54,3 @@ restart: unless-stopped | ||
| volumes: | ||
| - ./configs/otel-collector.yaml:/etc/otel-collector/otel-collector.yaml:ro | ||
| - ./packages/obs-stack/configs/otel-collector.yaml:/etc/otel-collector/otel-collector.yaml:ro | ||
| depends_on: | ||
@@ -57,0 +57,0 @@ - tempo |
+1
-1
| { | ||
| "name": "@emeryld/obs-stack", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "description": "Docker Compose-based Grafana + Tempo + Loki + OpenTelemetry Collector stack", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
+2
-1
@@ -20,2 +20,3 @@ # Observability stack | ||
| ``` | ||
| The CLI now runs `docker compose` from the workspace root so that the compose file's workspace-relative bindings (for example, `./packages/obs-stack/grafana/provisioning`) always point at the versioned files. If you run `docker compose` yourself, do it from the workspace root or add `--project-directory packages/obs-stack` so Grafana can read `grafana/provisioning/dashboards/files` instead of logging `stat /etc/grafana/provisioning/dashboards/files: no such file or directory`. | ||
| 5. Inspect the endpoints reported by the CLI: | ||
@@ -128,3 +129,3 @@ ```bash | ||
| - **Ports already in use**: edit `packages/obs-stack/.env` (or your local override), then run `pnpm --filter @emeryld/obs-stack obs-stack reset` to recreate the stack with the new settings. | ||
| - **Grafana dashboards missing**: ensure the `grafana/provisioning` folder is mounted (the CLI runs from the package root) and restart Grafana via `obs-stack reset`. | ||
| - **Grafana dashboards missing**: make sure the CLI (or any manual `docker compose` command) starts from the workspace root so the `./packages/obs-stack/grafana/provisioning` bind mounts the expected files. Running Compose from another directory mounts an empty folder and Grafana will keep printing `stat /etc/grafana/provisioning/dashboards/files: no such file or directory`; after you fix the working directory, restart the stack with `obs-stack reset`. | ||
| - **Collector fails to start**: make sure the collector can resolve `tempo` and `loki`. The CLI always runs Compose inside the package directory so no host networking is required. | ||
@@ -131,0 +132,0 @@ - **`docker compose` not on PATH**: install Docker Desktop (Mac/Windows) or Docker Engine with the Compose plugin (Linux) so both `docker` and `docker compose` can run. |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
43463
2.37%813
0.12%141
0.71%