Major Features:
- SSO: Microsoft Azure AD authentication with kill switch for local dev
- Naming: Spot version dropdown (MST/REF/None), optional duration field
- Tracking: New Asset Mode with -N suffix for folder-only inheritance
- Database: Update to port 5437, MD5 authentication for compatibility
SSO Implementation:
- AuthMiddleware.php: JWT validation with configurable SSO toggle
- JWTValidator.php: Azure AD token validation using Firebase JWT
- auth.php: Login/logout/status API endpoints
- Login page with Montserrat font matching main app design
- Kill switch in config.php ('sso' => ['enabled' => false])
Naming Convention Changes:
- Spot Version: Changed from text input to dropdown (None/MST/REF only)
- Duration: Now optional with "Include Duration" checkbox
- Removed Master File checkbox (MST now in spot version dropdown)
- Updated documentation and help sections
Tracking ID -N Suffix Feature:
- Standard mode (e.g., pOiJ9s): Full metadata inheritance
- New Asset Mode (e.g., pOiJ9s-N): Upload folder only, no metadata
- UI: Checkbox to toggle -N suffix automatically
- API: Strips -N before DB lookup, preserves in filenames
- Decoder: Shows mode indicator with visual distinction
Database Updates:
- Changed port from 5433 to 5437 in config.php and docker-compose.yml
- Updated Database.php to query master_assets table directly
- MD5 authentication for MAMP compatibility
Documentation:
- NAMING_CONVENTION_CHANGES.md: Complete guide for backend developers
- Includes code examples, migration checklist, and scenarios
- db-test.php and auth-test.php: Debug tools for troubleshooting
Files Modified:
- config.php: Added SSO settings with kill switch
- public-v2/index.php: SSO authentication, logout button, user display
- public-v2/api.php: Updated paths, -N suffix handling, optional duration
- public-v2/Database.php: Direct table query, port update
- public-v2/js/app.js: New Asset Mode toggle, validation updates
- docker-compose.yml: Port 5437
Files Added:
- public-v2/AuthMiddleware.php: SSO authentication handler
- public-v2/JWTValidator.php: JWT token validation
- public-v2/auth.php: Authentication API
- public-v2/auth-test.php: Auth status debugging tool
- public-v2/db-test.php: Database connection testing tool
- public-v2/data.json: Naming convention reference data
- NAMING_CONVENTION_CHANGES.md: Developer documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: ferrero-tracking-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ferrero_tracking
|
|
POSTGRES_USER: ferrero_user
|
|
POSTGRES_PASSWORD: ferrero_pass_2025
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --auth=md5"
|
|
POSTGRES_HOST_AUTH_METHOD: md5
|
|
ports:
|
|
- "5437:5432" # Using 5437 externally to avoid conflicts
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./database/init.sql:/docker-entrypoint-initdb.d/01-init.sql
|
|
- ./database/seed.sql:/docker-entrypoint-initdb.d/02-seed.sql
|
|
networks:
|
|
- ferrero-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ferrero_user -d ferrero_tracking"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
pgadmin:
|
|
image: dpage/pgadmin4:latest
|
|
container_name: ferrero-pgadmin
|
|
restart: unless-stopped
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: admin@ferrero.local
|
|
PGADMIN_DEFAULT_PASSWORD: admin
|
|
PGADMIN_CONFIG_SERVER_MODE: 'False'
|
|
ports:
|
|
- "5050:80"
|
|
volumes:
|
|
- pgadmin_data:/var/lib/pgadmin
|
|
networks:
|
|
- ferrero-network
|
|
depends_on:
|
|
- postgres
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
pgadmin_data:
|
|
driver: local
|
|
|
|
networks:
|
|
ferrero-network:
|
|
driver: bridge
|