feat: swap Redis for Dragonfly, fix remote installs, self-hosted email-only auth

- Replace redis:7-alpine with Dragonfly (Redis-protocol compatible; go-redis
  client unchanged) in root, infra, and backend-dev compose files. Bounded
  defaults --proactor_threads/--maxmemory so it boots on small VPSs.
- Frontend now defaults to same-origin API calls; nginx proxies /api/* to the
  backend (WebSocket-aware, docker DNS resolver for upstream re-resolution).
  Removes the baked localhost:8082 that broke installs reached by IP/domain.
- /auth/bootstrap returns configured OAuth providers; the UI hides
  GitHub/Google buttons unless real credentials exist. Self-hosted stays
  email/password only - OAuth reserved for a future managed offering.
- Sidecar ignores PLACEHOLDER_* OAuth credentials and trusts same-host
  origins dynamically (Origin host == request Host) so remote installs pass
  origin checks without config; cross-origin requests still rejected.
- install.sh writes ENVIRONMENT=production; COOKIE_SECURE=false in
  production is now a startup warning instead of fatal (plain-HTTP installs).
- Bootstrap failure surfaces an error notice instead of silently rendering
  the sign-in page.

Authored By: TDvorak <[email protected]>

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-21 17:24:43 +02:00
1 parent 9ba2bd06c5
commit 060038cb6f
21 files changed
+207 -83

No files matched your search

+4 -4
View File
@@ -68,7 +68,7 @@ Internet → Traefik (Port 80/443)
├── Frontend (React/Nginx)
├── Backend (Go API)
├── PostgreSQL (Database)
└── Redis (Cache)
└── Dragonfly (Cache)
```
## Configuration Files
@@ -138,8 +138,8 @@ docker-compose up -d --force-recreate
# Backup PostgreSQL
docker-compose exec postgres pg_dump -U containr_user containr > backup.sql
# Backup Redis
docker-compose exec redis redis-cli --rdb /data/dump.rdb
# Backup Dragonfly (snapshot)
docker-compose exec dragonfly redis-cli -a "$REDIS_PASSWORD" save
```
### SSL Certificates
@@ -211,7 +211,7 @@ docker-compose up -d
### Performance Tuning
1. **Nginx Caching** - Already configured in `nginx.conf`
2. **Redis Caching** - Configure in your application
2. **Dragonfly Caching** - Configure in your application
3. **Database Pooling** - Adjust connection limits in Go app
## Production Tips
+1 -1
View File
@@ -5,7 +5,7 @@
### Prerequisites
- Go 1.21+
- PostgreSQL 12+
- Redis (optional)
- Dragonfly or Redis-compatible cache (optional)
### Environment Variables