Fix build process and add production build support

🔧 Build Process Improvements:
- Update default 'build' target to use development mode
- Add new 'build-prod' target for production builds with validation
- Fix 'deploy-prod-quick' to use production build command
- Update 'build-test' to use development build (safer for CI)

📚 Documentation:
- Add comprehensive Production Build Guide (docs/deployment/PRODUCTION_BUILD.md)
- Include security requirements, configuration methods, and troubleshooting
- Update main documentation index with production build guide
- Update README with both build command options

 Features:
- Development builds work without security configuration
- Production builds require proper JWT/SESSION secrets
- Clear separation between dev and prod build processes
- Comprehensive production deployment documentation

🔒 Security:
- Enforced JWT_SECRET validation for production builds
- Clear documentation of required security configurations
- Examples for CI/CD integration with proper secret management
- Best practices for production deployment

🧪 Verification:
-  Development build: make build (works with warnings)
-  Production build validation: make build-prod (fails without secrets)
-  Production build with secrets: works correctly
-  All existing functionality preserved
This commit is contained in:
William Valentin
2025-09-08 19:23:42 -07:00
parent 430bc6acf8
commit beb9d84071
4 changed files with 421 additions and 7 deletions

View File

@@ -28,6 +28,7 @@ Welcome to the RxMinder documentation! This guide will help you navigate through
## 🚢 Deployment
- **[Deployment Guide](deployment/DEPLOYMENT.md)** - General deployment instructions
- **[Production Build Guide](deployment/PRODUCTION_BUILD.md)** - Production build configuration and security
- **[Docker Configuration](deployment/DOCKER_IMAGE_CONFIGURATION.md)** - Docker setup and configuration
- **[Gitea Setup](deployment/GITEA_SETUP.md)** - Gitea CI/CD configuration
- **[Storage Configuration](deployment/STORAGE_CONFIGURATION.md)** - Database and storage setup
@@ -61,9 +62,10 @@ Welcome to the RxMinder documentation! This guide will help you navigate through
### For Deployment
1. Read [Deployment Guide](deployment/DEPLOYMENT.md)
2. Configure [Docker](deployment/DOCKER_IMAGE_CONFIGURATION.md)
3. Set up [Storage](deployment/STORAGE_CONFIGURATION.md)
4. Review [Security](development/SECURITY.md) requirements
2. Configure [Production Build](deployment/PRODUCTION_BUILD.md) for secure deployment
3. Configure [Docker](deployment/DOCKER_IMAGE_CONFIGURATION.md)
4. Set up [Storage](deployment/STORAGE_CONFIGURATION.md)
5. Review [Security](development/SECURITY.md) requirements
### For API Integration