8 Commits

Author SHA1 Message Date
maaz519 e61b0dfebd fix: remove Redis password auth (internal network only, no public port) 2026-06-20 13:37:30 +05:30
maaz519 530f81416a feat: AI dev stream over HTTPS (SSE read + draft writeback)
Replaces the Redis-over-Tailscale handoff with a far simpler HTTP surface
on the existing public API — no Redis client, Tailscale, or firewall changes
needed on the dev side.

- GET /ai/stream — SSE feed of every ingested message, reads the internal
  Redis stream; resumes from Last-Event-ID on reconnect (no missed messages);
  heartbeats keep the connection warm through proxies
- POST /ai/drafts — writeback: creates a ContentDraft (PENDING_REVIEW) that
  shows up in the admin /admin/drafts review UI
- AiStreamGuard — static bearer token auth (AI_STREAM_TOKEN), accepts header
  or ?token= query for browser EventSource
- Remove Tailscale sidecar + public Redis port; Redis stays internal-only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 13:06:17 +05:30
maaz519 7cafbc8ba6 feat: reach Redis over Tailscale instead of public port (OCI firewall workaround)
- Add tailscale-redis sidecar sharing Redis network namespace
- Remove public 6380:6379 port mapping — nothing exposed to internet
- Redis now reachable on tailnet as tower-redis:6379 with password auth
- Tailscale uses only outbound connections, so no OCI Security List or
  host firewall changes needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 17:58:45 +05:30
maaz519 a0e5629f77 fix: use port 6380 for Redis external binding (6379 already allocated on host)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 15:49:40 +05:30
maaz519 4fdd8160fd feat: expose Redis externally with password auth for AI dev stream access
- Add requirepass to Redis with REDIS_PASSWORD env var
- Expose port 6379:6379 for external connections
- Update REDIS_URL in api and worker to include password
- Update healthcheck to pass auth flag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 14:58:54 +05:30
maaz519 d6da151d16 fix: add retry loop for database connection in entrypoint 2026-06-09 16:35:27 +05:30
maaz519 f9d5749dba added changes 2 2026-06-09 15:45:34 +05:30
maaz519 ff4d0f90e8 added changes 2026-06-09 15:33:21 +05:30