Commit Graph

8 Commits

Author SHA1 Message Date
f8508a436a Fix Interactive Route Map: Create MapRoute records from GPX files
- Create MapRoute database records for all GPX files for map visualization
- Populate route statistics (distance, elevation, coordinates) from GPX parsing
- Update GPX file statistics to mirror MapRoute data for post detail pages
- Enable /community/api/routes endpoint to return proper route data for map iframe
- Fix post detail page GPX statistics display

This resolves the issue where the community map showed '2 routes discovered'
but routes weren't actually rendering on the Leaflet.js map visualization.

Changes:
- Dockerfile: Updated init script paths and added migrate-db call
- app/__init__.py: Added admin user auto-creation with error handling
- app/routes/community.py: Added debug logging and API route for map data
- docker-compose.yml: Simplified to use .env for environment variables
- run.py: Added comprehensive database schema migration command
2025-12-31 18:46:21 +02:00
16cc3fb0ba 🔧 Remove obsolete version attribute from docker-compose.yml
- Remove 'version: 3.8' as it's no longer needed in modern Docker Compose
- Eliminates warning: 'the attribute version is obsolete, it will be ignored'
- Follows current Docker Compose best practices
2025-08-10 09:41:20 +03:00
ske087
5221cf3184 🔧 Fix GPX Statistics and Docker Volume Mapping
Critical Fixes:
🗺️ GPX Statistics Processing:
- Fixed Docker volume mapping from ./static/media to ./app/static/media
- GPX files now properly accessible in container for statistics calculation
- GPS route statistics (distance, elevation, track points) now display correctly
- Added fix_gpx_statistics.py utility script for reprocessing existing GPX files

🐛 Template Fixes:
- Fixed CSRF token undefined error in post_detail.html template
- Resolved 500 errors when accessing community post pages
- Template now uses form.csrf_token instead of csrf_token() function

�� Docker Improvements:
- Corrected volume mounting to ensure GPX file persistence
- Fixed path resolution for media files in containerized environment
- New posts will now properly save and process GPX files

 Verified Functionality:
- Community post pages load successfully (200 OK)
- GPS statistics display correctly (50.1 km distance, 2231 track points)
- Future posts will automatically calculate and display GPX statistics
- Docker container properly syncs with host filesystem

This update ensures the motorcycle adventure platform's GPS tracking and route statistics work reliably in production.
2025-08-10 09:12:19 +03:00
ske087
d1e2b95678 Implement data persistence for safe app updates
- Add external volume mounting for database, uploads, and media files
- Update Dockerfile to conditionally initialize database only if it doesn't exist
- Move database to external /data volume for persistence across rebuilds
- Configure production environment with proper FLASK_CONFIG
- Add volume mappings for complete data persistence:
  * ./data:/data - Database persistence
  * ./uploads:/opt/moto_site/uploads - File uploads persistence
  * ./static/media:/opt/moto_site/static/media - Media files persistence
- Create init script that skips database creation if DB already exists
- Enable safe app updates without losing users, posts, or tracks

This ensures all user data persists across Docker container rebuilds and app updates.
2025-08-09 16:40:49 +03:00
ske087
5897ed1cbc Update Dockerfile and docker-compose for /opt/moto_site structure and reliable Docker deployment 2025-07-29 02:16:43 +03:00
ske087
869a032051 Final project state: all changes and cleanup complete 2025-07-27 02:28:02 +03:00
ske087
3775462476 Map: Use standard Leaflet green/red pin icons for GPX route start/end markers in map_iframe_single.html 2025-07-27 02:03:30 +03:00
ske087
fc463dc69a Migrate from Next.js to Flask: Complete motorcycle adventure community website
- Replace Next.js/React implementation with Python Flask
- Add colorful blue-purple-teal gradient theme replacing red design
- Integrate logo and Transalpina panoramic background image
- Implement complete authentication system with Flask-Login
- Add community features for stories and tracks sharing
- Create responsive design with Tailwind CSS
- Add error handling with custom 404/500 pages
- Include Docker deployment configuration
- Add favicon support and proper SEO structure
- Update content for Pensiune BuonGusto accommodation
- Remove deprecated Next.js files and dependencies

Features:
 Landing page with hero section and featured content
 User registration and login system
 Community section for adventure sharing
 Admin panel for content management
 Responsive mobile-first design
 Docker containerization with PostgreSQL
 Email integration with Flask-Mail
 Form validation with WTForms
 SQLAlchemy database models
 Error pages and favicon handling
2025-07-23 14:42:40 +03:00