mirror of
https://github.com/sassanix/Warracker.git
synced 2026-01-03 12:09:37 -06:00
This update introduces comprehensive OpenID Connect (OIDC) Single Sign-On support with dynamic configuration via the database and full frontend/backend integration. Key additions include: - OIDC SSO login via external providers (e.g., Google, Keycloak), with automatic user provisioning and session linking. - Admin settings UI for enabling/disabling SSO and managing provider credentials. - Provider-branded SSO buttons with dynamic labels, icons, and styles. - Exact warranty expiration date support alongside duration-based input, with full validation and UI enhancements. - Full UI responsiveness for warranty field updates, tag creation, and note editing. - Memory usage optimization for low-resource deployments via configurable modes (optimized, ultra-light, performance). - Numerous fixes for SSO authentication flow, UI sync issues, database constraints, and modal interactions. - Upgraded dependencies for security, performance, and compatibility (Flask 3.0.3, Gunicorn 23.0.0, etc.). - Frontend improvements: Chart.js loading fix, tooltips for long product names, and dark/light mode-compatible footer. This release significantly improves authentication flexibility, performance, and user experience across all major components.
67 lines
2.7 KiB
YAML
67 lines
2.7 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
warracker:
|
|
build: .
|
|
ports:
|
|
- "8005:80"
|
|
volumes:
|
|
- ./uploads:/data/uploads
|
|
- ./backend/migrations:/app/migrations
|
|
environment:
|
|
- DB_HOST=warrackerdb
|
|
- DB_NAME=warranty_test
|
|
- DB_USER=warranty_user
|
|
- DB_PASSWORD=${DB_PASSWORD:-warranty_password}
|
|
- DB_ADMIN_USER=warracker_admin
|
|
- DB_ADMIN_PASSWORD=${DB_ADMIN_PASSWORD:-change_this_password_in_production}
|
|
- SMTP_HOST=${SMTP_HOST:-localhost}
|
|
- SMTP_PORT=${SMTP_PORT:-1025}
|
|
- SMTP_USERNAME=${SMTP_USERNAME:-notifications@warracker.com}
|
|
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
|
|
- SECRET_KEY=${SECRET_KEY:-your_very_secret_flask_key_change_me} # For Flask session and JWT
|
|
# OIDC SSO Configuration (User needs to set these based on their OIDC provider)
|
|
- OIDC_PROVIDER_NAME=${OIDC_PROVIDER_NAME:-oidc}
|
|
- OIDC_CLIENT_ID=${OIDC_CLIENT_ID:-} # e.g., your_oidc_client_id
|
|
- OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET:-} # e.g., your_oidc_client_secret
|
|
- OIDC_ISSUER_URL=${OIDC_ISSUER_URL:-} # e.g., https://your-oidc-provider.com/auth/realms/your-realm
|
|
- OIDC_SCOPE=${OIDC_SCOPE:-openid email profile}
|
|
# URL settings (Important for redirects and email links)
|
|
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:8005} # Public URL of the frontend (matching the port mapping)
|
|
- APP_BASE_URL=${APP_BASE_URL:-http://localhost:8005} # Public base URL of the application for links
|
|
- PYTHONUNBUFFERED=1
|
|
# Memory optimization settings
|
|
- WARRACKER_MEMORY_MODE=${WARRACKER_MEMORY_MODE:-optimized} # Options: optimized (default), ultra-light, performance
|
|
- MAX_UPLOAD_MB=${MAX_UPLOAD_MB:-16} # Reduced from 32MB default for memory efficiency
|
|
- NGINX_MAX_BODY_SIZE_VALUE=${NGINX_MAX_BODY_SIZE_VALUE:-16M} # Match upload limit
|
|
depends_on:
|
|
warrackerdb:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
command: >
|
|
bash -c "
|
|
cd /app && ls -la /app/migrations &&
|
|
python /app/migrations/apply_migrations.py &&
|
|
python /app/fix_permissions.py &&
|
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
|
"
|
|
|
|
warrackerdb:
|
|
image: "postgres:15-alpine"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
environment:
|
|
- POSTGRES_DB=warranty_test
|
|
- POSTGRES_USER=warranty_user
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-warranty_password}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|