- Replace invalid wildcard domains (*.aprs.me) with explicit origins
- Phoenix doesn't support wildcard syntax in check_origin
- Added specific domains for aprs.me, sentry.io, and openstreetmap.org
- Updated CLAUDE.md with kubectl commands for debugging k3s deployment
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit introduces several major performance improvements and adds
robust error handling for malformed HTTP requests:
Performance Optimizations:
- Add database migration with BRIN indexes for time-series data and partial
indexes for recent queries, significantly improving query performance
- Create global StreamingPacketsPubSub system for real-time packet distribution
with geographic bounds filtering using ETS for fast lookups
- Refactor PacketConsumer to use Stream module for memory-efficient processing,
preventing memory accumulation during batch operations
- Implement dedicated BroadcastTaskSupervisor pool for async broadcast operations,
preventing GenServer blocking on I/O
- Increase database connection pool from 25 to 45 (production) and 15 to 30 (dev)
for better concurrency support
Error Handling:
- Add SentryFilter to prevent Bandit.HTTPError from missing Host headers from
cluttering Sentry (common with bots/scanners)
- Configure custom 400 Bad Request error handling
- Filter out common bot/scanner paths from error reporting
All changes include comprehensive test coverage following TDD practices.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed all console.log debugging statements from app.js (theme changes, chart rendering)
- Removed all console.log statements from map.ts (map initialization, data processing)
- Removed all console.debug statements from map_helpers.ts
- Removed all console.debug statements from map_fixes.ts
- Kept essential console.error and console.warn statements for error handling
- Reduced bundle size by ~1.4kb
This cleanup removes unnecessary debug output while maintaining error reporting
for production debugging via console.error and Sentry.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit introduces a complete setup for deploying the Phoenix application
to a K3s Kubernetes cluster, along with a GitHub Actions workflow for
automated builds and deployments.
Key changes include:
- **Kubernetes Manifests (`k8s/`)**:
- Namespace (`aprs-app`) for isolating application resources.
- PostgreSQL setup: PersistentVolumeClaim, Deployment, and Service.
- Application setup: Deployment (with init container for migrations) and
Service (NodePort).
- An example secrets file (`k8s/secrets.yaml.example`) for configuration.
- `.gitignore` updated to exclude `k8s/secrets.yaml`.
- **GitHub Actions Workflow (`.github/workflows/deploy-k3s.yaml`)**:
- Builds the Docker image on pushes to the main branch.
- Pushes the image to GitHub Container Registry (GHCR).
- Deploys the application to K3s by applying the manifests.
- Dynamically updates the application deployment with the correct image tag.
- Requires `KUBE_CONFIG_DATA` GitHub secret for K3s authentication.
- **Application Configuration (`config/runtime.exs`)**:
- Commented out `libcluster` configuration specific to Fly.io to prevent
issues in a standard K3s environment.
- **Documentation (`README.md`)**:
- Added a new "Kubernetes (K3s) Deployment" section detailing:
- Prerequisites and initial setup (GitHub & K8s secrets).
- Workflow overview.
- Application configuration notes (health checks, migrations).
- Instructions for accessing the application.
This setup provides a robust foundation for CI/CD and running the
application in a self-hosted K3s environment.