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>
WORKING BASELINE CONFIRMED:
- TeleBot: Checkout flow fixed, currency display corrected
- LittleShop: CSRF tokens fixed, SilverPay integration working
- SilverPay: Payment creation fixed with fiat_amount field
- Network: All containers connected on littleshop-network
- Payments: Successfully creating crypto payments with live exchange rates
Test confirmed: £10 GBP = 0.00011846 BTC at £84,415.99/BTC
All systems operational and integrated.