mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
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:
1 parent
9ba2bd06c5
commit
060038cb6f
21 files changed
+207
-83
No files matched your search
+16
-5
@@ -1,4 +1,5 @@
|
||||
# Local development env file. Use .env.prod for production.
|
||||
# Local development env file. install.sh writes ENVIRONMENT=production for
|
||||
# self-hosted installs - keep development here only for the checkout workflow.
|
||||
|
||||
# Domain Configuration
|
||||
DOMAIN=localhost
|
||||
@@ -28,9 +29,12 @@ AUTO_MIGRATE=true
|
||||
MIGRATION_LOCK_TIMEOUT=2m
|
||||
SEED_DATA_ON_START=false
|
||||
|
||||
# Redis Configuration
|
||||
# Dragonfly Configuration (Redis-compatible cache - REDIS_* names kept for compatibility)
|
||||
REDIS_PASSWORD=your_secure_redis_password
|
||||
REDIS_URL=redis://:your_secure_redis_password@localhost:6379/0
|
||||
# DRAGONFLY_VERSION=latest
|
||||
# DRAGONFLY_THREADS=1
|
||||
# DRAGONFLY_MAXMEMORY=256mb
|
||||
|
||||
# Application Configuration
|
||||
# In production this must be a strong value with at least 32 characters.
|
||||
@@ -40,8 +44,11 @@ CONTAINR_AGENT_AUTH_TOKEN=replace_with_strong_agent_secret
|
||||
# Optional rotation list (comma-separated). When set, this takes precedence.
|
||||
# CONTAINR_AGENT_AUTH_TOKENS=current_secret,next_secret
|
||||
CORS_ORIGINS=http://localhost:3000,http://localhost:8080
|
||||
VITE_API_URL=http://localhost:8082
|
||||
VITE_AUTH_URL=http://localhost:8082/api/auth
|
||||
# Optional build-time API URL overrides. Leave empty for the default
|
||||
# same-origin setup - the frontend nginx proxies /api to the backend, which
|
||||
# works from any host or IP without rebuilding the image.
|
||||
# VITE_API_URL=https://api.example.com
|
||||
# VITE_AUTH_URL=https://api.example.com/api/auth
|
||||
AUTH_PORT=3001
|
||||
# In production this must be true.
|
||||
COOKIE_SECURE=false
|
||||
@@ -54,6 +61,8 @@ BETTER_AUTH_AUTO_MIGRATE=true
|
||||
BETTER_AUTH_INTERNAL_TOKEN=PLACEHOLDER_INTERNAL_AUTH_TOKEN
|
||||
BETTER_AUTH_INTERNAL_URL=http://127.0.0.1:3001/internal/session
|
||||
BETTER_AUTH_PROXY_URL=http://127.0.0.1:3001
|
||||
# Extra trusted origins (comma-separated). Same-origin traffic is trusted
|
||||
# automatically, so this only needs entries for cross-origin callers.
|
||||
BETTER_AUTH_TRUSTED_ORIGINS=http://localhost:3000,http://localhost:8082
|
||||
# Optional explicit auth DB settings (recommended when password contains URL special chars)
|
||||
DB_HOST=postgres
|
||||
@@ -64,7 +73,9 @@ DB_PASSWORD=your_secure_postgres_password
|
||||
FRONTEND_URL=http://localhost:3000
|
||||
BACKEND_URL=http://localhost:8082
|
||||
|
||||
# OAuth (user auth)
|
||||
# OAuth (user auth) - GitHub/Google sign-in is reserved for the managed
|
||||
# offering. Self-hosted installs use email/password only; PLACEHOLDER_*
|
||||
# values are treated as unset and the buttons stay hidden.
|
||||
GITHUB_CLIENT_ID=PLACEHOLDER_GITHUB_OAUTH_CLIENT_ID
|
||||
GITHUB_CLIENT_SECRET=PLACEHOLDER_GITHUB_OAUTH_CLIENT_SECRET
|
||||
GITLAB_CLIENT_ID=PLACEHOLDER_GITLAB_CLIENT_ID
|
||||
|
||||
Reference in new issue
Block a user