Update run.sh: Include Appwrite collections setup and data seeding
tiffank1802
479451c
feat: Implement Appwrite API integration for cloud-native database access
tiffank1802
4d37ab1
- Create Appwrite wrapper (appwrite_db.py) with methods for CRUD operations
- Add service layer (app_core/services.py) providing SpecialiteService, ActualiteService, ContactService, PartenairesService, StatistiqueService
- Update views.py to use service layer instead of Django ORM
- Create management commands:
- setup_appwrite_collections: Initialize Appwrite collections with proper schema
- seed_appwrite: Seed initial data into Appwrite collections
- Add test_appwrite_crud.py to verify all CRUD operations work correctly
- All tests pass: 3 specialites, 3 actualites, 3 partenaires, 3 statistiques, contact operations fully functional
- Data now persists in Appwrite cloud (5GB free tier) instead of ephemeral SQLite
Update run.sh: Use init_db instead of loaddata for data initialization
tiffank1802
ad2a787
- Change step 3 from loaddata to init_db command
- Better error handling and verbosity
- Ensures data is always initialized on HF Spaces
- Local test: Homepage loads correctly (200 OK, 15761 bytes)
Fix: Lazy initialize file_manager to prevent startup blocking
tiffank1802
cb15999
- Replace global SimpleFileManager() with lazy initialization
- Add get_file_manager() function for delayed initialization
- Create FileManagerProxy for backward compatibility
- Add 2s timeout to MongoDB ping command
- Prevents 38-second timeout during module import
- Fixes WORKER TIMEOUT error on HF Spaces startup
All local tests pass (5/5)
Fix: Add initial data fixture and improve migration handling
tiffank1802
73e3d77
- Create app_core/fixtures/initial_data.json with sample specialties
- Add init_db management command for database initialization
- Update run.sh to load initial data after migrations
- Add loaddata step to startup sequence
- Increase gunicorn timeout to 120s
- Show full verbosity for migrations and static files collection
Add documentation index for easy navigation
tiffank1802
7984e4f
- Quick start guide for different situations
- Navigation by use case
- Complete documentation map
- Learning path for understanding the system
- Checklist for confirmation of understanding
Add action plan for immediate next steps
tiffank1802
1491819
- Quick verification checklist
- 4 simple steps to verify deployment
- Success criteria checklist
- Quick troubleshooting for common issues
- Estimated timeline (30 minutes)
Add comprehensive production README
tiffank1802
51bb26f
- Overview of ENISE Site project and deployment
- Quick deployment instructions
- Complete technology stack overview
- Security best practices
- Troubleshooting guide
- Monitoring and update procedures
Add French deployment verification guide
tiffank1802
f2d53ec
- Complete step-by-step guide for verifying HF Spaces deployment
- Endpoint testing procedures with expected responses
- Common problems and troubleshooting solutions
- Advanced debugging techniques
- Local Docker testing instructions
Add deployment verification tools and status document
tiffank1802
2bf2b45
- test_deployment.py: Comprehensive test suite for local verification
- check_env.py: Environment variables verification script
- DEPLOYMENT_STATUS.md: Current deployment status and verification guide
- All tests passing: Configuration, Database, Endpoints, Appwrite, Static Files
Add quick start guide for HF Spaces deployment
tiffank1802
e51319a
- Simple step-by-step instructions for setting up secrets
- Links to all key resources
- Troubleshooting section
- Project overview and status
Add comprehensive deployment documentation
tiffank1802
9f5d903
- FIXES_APPLIED.md: Details all fixes applied to production code
- DEPLOYMENT_CHECKLIST.md: Complete guide for HF Spaces configuration and verification