diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..7005d8b --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,62 @@ +name: Build and Publish Docker Image + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: 'Image tag (e.g., v1.0.0 or latest)' + required: true + default: 'latest' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: checkend/checkend + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a37e0fc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,114 @@ +# Changelog + +All notable changes to Checkend will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0] - 2024-12-28 + +### Added + +#### Error Ingestion +- REST API endpoint (`POST /ingest/v1/errors`) for receiving errors from client applications +- Authentication via `Checkend-Ingestion-Key` header +- Error class, message, and backtrace capture +- Context, request, and user info capture +- Custom fingerprint support for error grouping +- Notifier metadata (SDK name, version, language) +- Occurred timestamp support + +#### Error Grouping & Management +- Automatic fingerprinting based on error class and first backtrace line +- Problem model for grouped errors +- Notice model for individual occurrences +- Backtrace deduplication to save storage +- Resolve/unresolve problems +- Auto-unresolve on error reoccurrence +- Bulk operations (resolve, unresolve, add/remove tags) + +#### Web Dashboard +- Apps CRUD with slug-based URLs +- Problems list with pagination (Pagy) +- Problem detail view with occurrence chart +- Notice detail view with full context +- Status filtering (unresolved/resolved) +- Date range filtering (last seen) +- Minimum notices filter +- Tag-based filtering +- Setup wizard for new apps +- Sticky breadcrumb navigation +- Slide-over modals for forms +- Dark mode support + +#### Tagging System +- Tag model with uniqueness validation +- Problem-tag many-to-many relationship +- Add/remove tags via UI with autocomplete +- Bulk tag operations +- Filter problems by tags + +#### Notifications +- Email notifications for new problems and reoccurrences +- Slack webhook integration +- Discord webhook integration +- Generic webhook integration +- GitHub issue creation +- Per-app notification settings +- Per-user notification preferences + +#### Teams & Access Control +- Team model with owner +- Team members with roles (admin, member) +- Team invitations via email +- Team-app assignments +- Access control (users see only their team's apps) +- Site admin role for system-wide management + +#### Application API (v1) +- API key authentication with scoped permissions +- Health endpoint +- Apps CRUD +- Problems list/show with resolve/unresolve +- Bulk problem operations +- Notices list/show +- Tags management +- Teams and team members CRUD +- Users management (admin only) + +#### Admin Features +- Site admin users +- User management (CRUD) +- SMTP configuration +- Session management + +#### Client SDKs +- Ruby SDK ([checkend-ruby](https://github.com/furvur/checkend-ruby)) +- JavaScript Browser SDK ([checkend-browser](https://github.com/furvur/checkend-browser)) +- JavaScript Node.js SDK ([checkend-node](https://github.com/furvur/checkend-node)) +- Python SDK ([checkend-python](https://github.com/furvur/checkend-python)) +- Go SDK ([checkend-go](https://github.com/furvur/checkend-go)) +- PHP SDK ([checkend-php](https://github.com/furvur/checkend-php)) +- Elixir SDK ([checkend-elixir](https://github.com/furvur/checkend-elixir)) +- Java SDK ([checkend-java](https://github.com/furvur/checkend-java)) +- .NET SDK ([checkend-dotnet](https://github.com/furvur/checkend-dotnet)) + +#### Infrastructure +- PostgreSQL with separate databases (main, cache, queue, cable) +- Solid Queue for background jobs +- Solid Cache for caching +- Solid Cable for WebSockets +- Kamal deployment configuration +- Pre-commit hook for secret detection +- CI/CD with GitHub Actions + +#### Documentation +- Marketing site with Astro +- SDK documentation for all client libraries +- API documentation +- Self-hosting guide with Kamal + +[Unreleased]: https://github.com/furvur/checkend/compare/v1.0.0...HEAD +[1.0.0]: https://github.com/furvur/checkend/releases/tag/v1.0.0 diff --git a/README.md b/README.md index bf68ced..855381f 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,61 @@ Report an error to Checkend. } ``` -## Deployment with Kamal +## Deployment + +### Option 1: Docker (Recommended for Quick Start) + +The easiest way to run Checkend is with our pre-built Docker image from GitHub Container Registry: + +```bash +docker pull ghcr.io/checkend/checkend:latest +``` + +**Quick start with Docker Compose:** + +```yaml +# docker-compose.yml +services: + checkend: + image: ghcr.io/checkend/checkend:latest + ports: + - "80:80" + environment: + - RAILS_MASTER_KEY=${RAILS_MASTER_KEY} + - DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@db/checkend + - SOLID_QUEUE_IN_PUMA=true + depends_on: + - db + + db: + image: postgres:17 + environment: + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DB=checkend + volumes: + - postgres_data:/var/lib/postgresql/data + +volumes: + postgres_data: +``` + +```bash +# Generate secrets +export POSTGRES_PASSWORD=$(openssl rand -hex 16) +export RAILS_MASTER_KEY=$(openssl rand -hex 32) + +# Start the services +docker compose up -d +``` + +Visit `http://localhost` and create your account. + +**Available image tags:** +- `latest` - Latest stable release +- `v1.0.0` - Specific version (recommended for production) +- `v1.0`, `v1` - Major/minor version tracking + +### Option 2: Kamal (Zero-Downtime Deployments) Checkend uses [Kamal](https://kamal-deploy.org/) for zero-downtime deployments to any server. This guide walks you through deploying Checkend to a fresh VPS.