-
Notifications
You must be signed in to change notification settings - Fork 5
Add Claude Code configuration and Docker Compose for InfluxDB 3 #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/influxdb3-core-3.8.1
Are you sure you want to change the base?
Changes from 12 commits
d0ad46e
2431ad9
324063a
41c7e1a
b878619
07c514a
85b5b40
f9cf64a
d885cd8
a640134
f6c3e04
a72bf4b
4b74cc5
7b98aaa
49f0d96
1f093ea
14d4f71
a2c5937
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(npm:*)", | ||
| "Bash(yarn:*)", | ||
| "Bash(npx:*)", | ||
| "Bash(node:*)", | ||
| "Bash(curl:*)", | ||
| "Bash(gh:*)", | ||
| "Bash(jq:*)", | ||
| "Bash(mkdir:*)", | ||
| "Bash(docker:*)", | ||
| "Bash(docker compose:*)", | ||
| "Edit", | ||
| "Read", | ||
| "Write", | ||
| "Grep", | ||
| "Glob", | ||
| "LS" | ||
| ], | ||
| "deny": [ | ||
| "Read(./.env)", | ||
| "Read(./.env.*)", | ||
| "Read(./secrets/**)" | ||
| ], | ||
|
Comment on lines
+21
to
+25
|
||
| "ask": [ | ||
| "Bash(git push:*)" | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,195 @@ | ||||||
| --- | ||||||
| name: run-tests | ||||||
| description: Run API tests against InfluxDB 3 Core. Handles service initialization, database setup, and test execution. | ||||||
| author: InfluxData | ||||||
| version: "1.0" | ||||||
|
Comment on lines
+2
to
+5
|
||||||
| --- | ||||||
|
|
||||||
| # Run Tests Skill | ||||||
|
|
||||||
| ## Purpose | ||||||
|
|
||||||
| This skill guides running the IoT API test suite against a local InfluxDB 3 Core instance. It covers service setup, database creation, and test execution. | ||||||
|
|
||||||
|
Comment on lines
+10
to
+13
|
||||||
| ## Quick Reference | ||||||
|
|
||||||
| | Task | Command | | ||||||
| |------|---------| | ||||||
| | Start InfluxDB 3 | `docker compose up -d influxdb3-core` | | ||||||
| | Check status | `curl -i http://localhost:8181/health` | | ||||||
| | Run tests | `yarn test` | | ||||||
| | View logs | `docker logs influxdb3-core` | | ||||||
|
|
||||||
| ## Complete Setup Workflow | ||||||
|
|
||||||
| ### 1. Initialize InfluxDB 3 Core | ||||||
|
|
||||||
| ```bash | ||||||
| # Create required directories | ||||||
| mkdir -p test/.influxdb3/core/data test/.influxdb3/core/plugins | ||||||
|
|
||||||
| # Generate admin token (first time only) | ||||||
| openssl rand -hex 32 > test/.influxdb3/core/.token | ||||||
| chmod 600 test/.influxdb3/core/.token | ||||||
|
|
||||||
| # Start the container | ||||||
| docker compose up -d influxdb3-core | ||||||
|
|
||||||
| # Wait for healthy status | ||||||
| docker compose ps | ||||||
| ``` | ||||||
|
|
||||||
| ### 2. Create Databases | ||||||
|
|
||||||
| ```bash | ||||||
| # Get the token | ||||||
| TOKEN=$(cat test/.influxdb3/core/.token) | ||||||
|
|
||||||
| # Create main database | ||||||
| curl -X POST "http://localhost:8181/api/v3/configure/database" \ | ||||||
| -H "Authorization: Bearer $TOKEN" \ | ||||||
| -H "Content-Type: application/json" \ | ||||||
| -d '{"db": "iot_center"}' | ||||||
|
|
||||||
| # Create auth database | ||||||
| curl -X POST "http://localhost:8181/api/v3/configure/database" \ | ||||||
| -H "Authorization: Bearer $TOKEN" \ | ||||||
| -H "Content-Type: application/json" \ | ||||||
| -d '{"db": "iot_center_auth"}' | ||||||
|
||||||
| -d '{"db": "iot_center_auth"}' | |
| -d '{"db": "iot_center_devices"}' |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .env.local template sets INFLUX_DATABASE_AUTH=iot_center_auth, but .env.development/README default to iot_center_devices. Please update the template (or the project defaults) so users don’t end up with mismatched database names.
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The auth database name is inconsistent with the rest of the repo defaults (INFLUX_DATABASE_AUTH=iot_center_devices in .env.development/README). Here it’s iot_center_auth in both the database creation step and the suggested .env.local, which will misconfigure the app unless users also change defaults. Please align on a single name.
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Troubleshooting suggests grep INFLUX_TOKEN .env.local, but .claude/settings.json denies Read(./.env.*)—an agent using Claude Code won’t be permitted to run read operations against .env.local. Either relax the deny rule (for non-secret .env.development at least) or adjust troubleshooting steps to avoid reading .env.* files.
| echo "Token in .env.local: $(grep INFLUX_TOKEN .env.local)" | |
| echo "INFLUX_TOKEN env var: ${INFLUX_TOKEN:-'(not set)'}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # AI Instructions Navigation Guide | ||
|
|
||
| This repository has multiple instruction files for different AI tools and use cases. | ||
|
|
||
| ## Quick Navigation | ||
|
|
||
| | If you are... | Use this file | Purpose | | ||
| |---------------|---------------|---------| | ||
| | **GitHub Copilot** | [../AGENTS.md](../AGENTS.md) | Development patterns, code examples | | ||
| | **Claude, ChatGPT, Gemini** | [../AGENTS.md](../AGENTS.md) | Comprehensive development guide | | ||
| | **Claude with MCP** | [../CLAUDE.md](../CLAUDE.md) | Quick reference with skill pointers | | ||
|
|
||
| ## File Organization | ||
|
|
||
| ``` | ||
| iot-api-js/ | ||
| ├── .claude/ | ||
| │ ├── settings.json # Claude permissions | ||
| │ └── skills/ | ||
| │ └── run-tests/SKILL.md # Test execution workflow | ||
| ├── .github/ | ||
| │ └── INSTRUCTIONS.md # THIS FILE - Navigation guide | ||
| ├── AGENTS.md # Comprehensive AI assistant guide | ||
| ├── CLAUDE.md # Claude with MCP quick reference | ||
| └── README.md # User-facing documentation | ||
| ``` | ||
|
|
||
| ## What's in Each File | ||
|
|
||
| **[../CLAUDE.md](../CLAUDE.md)** - Quick reference for Claude: | ||
| - Project overview | ||
| - Quick commands | ||
| - Structure summary | ||
| - Links to skills | ||
|
|
||
| **[../AGENTS.md](../AGENTS.md)** - Comprehensive guide: | ||
| - Architecture diagram | ||
| - Development workflow | ||
| - Code patterns and examples | ||
| - Common tasks | ||
| - Style guidelines | ||
|
|
||
| **[../README.md](../README.md)** - User documentation: | ||
| - Setup instructions | ||
| - API usage | ||
| - Troubleshooting | ||
|
|
||
| ## Getting Started | ||
|
|
||
| 1. **New to the repository?** Start with [../README.md](../README.md) | ||
| 2. **Using AI assistants?** Read [../AGENTS.md](../AGENTS.md) | ||
| 3. **Using Claude with MCP?** Check [../CLAUDE.md](../CLAUDE.md) and [../.claude/](../.claude/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deny rule
Read(./.env.*)blocks reading.env.development, even though the repo treats it as committed non-secret defaults and the new docs reference copying values from it. Consider narrowing the deny list to only secret-bearing files (for example.env.localand.env*.local) or explicitly allowing reads of.env.developmentso the assistant can follow the documented workflows.