Commit Graph

1 Commits

Author SHA1 Message Date
94b6bd421d Fix HTTP 500 on login and create comprehensive deployment documentation
CRITICAL FIXES:
- Fixed JWT key configuration issue causing HTTP 500 on login
  - Changed environment variable from JWT_SECRET_KEY to Jwt__Key (double underscore)
  - Increased JWT key length to >32 bytes (256 bits) as required by HMAC-SHA256
  - Fixed ASPNETCORE_URLS configuration (not ASPNETCORE_HTTP_PORTS)

DOCUMENTATION CREATED:
- TROUBLESHOOTING.md: Complete troubleshooting guide with common issues and solutions
- deploy-littleshop.sh: Automated deployment script with working configuration
- docker-compose.hostinger.yml: Docker Compose file with all correct environment variables
- Updated WORKING_BASELINE_2024-09-24.md: Added HTTP 500 fix details

ROOT CAUSES IDENTIFIED:
1. JWT key environment variable naming mismatch (Jwt__Key vs JWT_SECRET_KEY)
2. JWT key too short (was 17 bytes, needs >32 bytes)
3. ASP.NET Core URL configuration issue (ASPNETCORE_URLS vs HTTP_PORTS)
4. Database file permissions (must be owned by UID 1654)

WORKING CONFIGURATION:
- Jwt__Key with 79-byte key
- ASPNETCORE_URLS=http://+:8080
- Proper Docker network configuration (littleshop-network)
- SilverPay integration on port 8000 (not 8001)

This commit ensures we have a stable, documented baseline for future updates
and addresses the concern about "one step forward, two steps back" by
providing comprehensive documentation of all fixes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 22:48:25 +01:00