6c8c05b13b
- Buffer locale samples[] per aggiornamenti real-time - Poll /api/status ogni 10 secondi - Aggiunge nuovi campioni senza ricaricare history - Aggiunge AGENTS.md per istruzioni agenti OpenCode - Aggiunge team agenti in .opencode/agents/
1.6 KiB
1.6 KiB
name, description, allowed-tools
| name | description | allowed-tools | ||||||
|---|---|---|---|---|---|---|---|---|
| supabase-pinger-dev | Supabase Pinger — manage Supabase keep-alive service |
|
<project_structure> supabase-pinger/ ├── app.py # FastAPI app + ping logic ├── tests/ │ ├── conftest.py # Test config │ └── test_api.py # API tests ├── AGENTS.md # Agent instructions ├── requirements.txt # Python deps ├── Dockerfile └── docker-compose.yml </project_structure>
# Run server (requires valid .env) python app.pyRun tests
pytest -q
Docker build
docker build -t supabase-pinger .
Docker run
docker run -d --env-file .env -p 8080:8080 --restart unless-stopped supabase-pinger
<api_endpoints>
- GET / # Dashboard (SmokePing-style)
- GET /api/status # Latest sample
- GET /api/history # History (hours param)
- GET /docs # Swagger UI
- GET /openapi.json # OpenAPI schema </api_endpoints>
<key_components>
- create_app() # Main factory
- Settings # Config dataclass
- RRDStore # Circular buffer storage
- run_ping() # Execute keep-alive
- collector_loop() # Daemon thread </key_components>
<env_vars>
- SUPABASE_DB_HOST
- SUPABASE_DB_PORT
- SUPABASE_DB_NAME
- SUPABASE_DB_USER
- SUPABASE_DB_PASSWORD
- PING_INTERVAL_MINUTES
- PING_QUERY
- WEB_HOST
- WEB_PORT </env_vars>
<when_to_use>
- Any work on supabase-pinger project
- Development, testing, or deployment </when_to_use>