Skip to content

Add Docker Compose with HAProxy authentication#9

Open
joelhelbling wants to merge 3 commits into
nafey:masterfrom
joelhelbling:add-docker-compose
Open

Add Docker Compose with HAProxy authentication#9
joelhelbling wants to merge 3 commits into
nafey:masterfrom
joelhelbling:add-docker-compose

Conversation

@joelhelbling

Copy link
Copy Markdown
Contributor

Depends on #8 - Please merge #8 first, then this PR's diff will show only the compose-related changes.

Summary

  • Adds compose.yml with two services: minimalytics + HAProxy auth proxy
  • HAProxy provides basic auth for dashboard while leaving /api/event/ open for ingestion
  • Both containers use alpine:3.20 for shared base layers (smaller total size)
  • Includes .env.example with documented configuration options

Files added

  • compose.yml - Docker Compose configuration
  • proxy/Dockerfile - HAProxy container (alpine:3.20)
  • proxy/haproxy.cfg - HAProxy config with auth rules
  • .env.example - Environment variable template

Usage

cp .env.example .env
# Edit .env with your credentials
docker compose up -d
  • Dashboard (requires auth): http://localhost:3334
  • Event API (no auth): http://localhost:3334/api/event/

Test plan

  • cp .env.example .env and configure credentials
  • docker compose up -d
  • Verify dashboard at :3334 prompts for auth
  • Verify /api/event/ works without auth:
    curl -X POST http://localhost:3334/api/event/ -H "Content-Type: application/json" -d '{"event": "test"}'

🤖 Generated with Claude Code

joelhelbling and others added 3 commits December 31, 2025 15:19
- Multi-stage build using golang:1.23-alpine and alpine:3.20
- CGO enabled for SQLite support
- Includes static files for web UI
- Documents Docker build/run in README

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Excludes git history, build artifacts, and local config files
from Docker build context.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- compose.yml with minimalytics and haproxy services
- HAProxy config with basic auth for dashboard, open /api/event/
- Both containers use alpine:3.20 for shared base layers
- .env.example with documented configuration options
- Updated README with Docker Compose instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant