Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3811274
Add comprehensive upgrade documentation framework
adechristanto Jul 27, 2025
3a63204
Update compatibility matrix with research findings
adechristanto Jul 27, 2025
976af67
✅ Successfully upgrade Wagtail 2.13 → 2.14
adechristanto Jul 27, 2025
21d6425
Update upgrade log with successful Wagtail 2.13 → 2.14 completion
adechristanto Jul 27, 2025
b50cfeb
feat: Re-enable wagtail-birdsong with forked version for Wagtail 6.x/…
adechristanto Jul 27, 2025
5f371ff
feat: Set up wagtail-birdsong as git submodule
adechristanto Jul 27, 2025
5b43362
docs: Update upgrade documentation with wagtail-birdsong fork completion
adechristanto Jul 28, 2025
617af0f
Re-enable comments-wagtail-xtd with git submodule approach
adechristanto Jul 28, 2025
e834cba
Fix Wagtail 6.4 upgrade errors and restore functionality
adechristanto Jul 28, 2025
80f51eb
Fix wagtailpolls ObjectList.bind_to compatibility with Wagtail 6.4.2
adechristanto Jul 28, 2025
465af71
Fix ReadOnlyPanel compatibility with Wagtail 6.0+
adechristanto Jul 28, 2025
e236b34
Fix birdsong template error after Wagtail 6.4 upgrade
adechristanto Jul 28, 2025
6459272
Fix: Resolve Wagtail 6.4.2 PageLogEntry database schema issues
adechristanto Jul 28, 2025
edeba3c
Fix PWA icon 404 errors by creating custom service worker
adechristanto Jul 28, 2025
e5d00df
docs: Create comprehensive README.md for Strafrecht Online
adechristanto Jul 28, 2025
4038c92
chore: Remove stray file =2.2.0
adechristanto Jul 28, 2025
f134335
Start upgrade frontend
adechristanto Jul 29, 2025
aea0222
Fix collectstatic issues: Install missing dependencies and configure …
adechristanto Jul 29, 2025
a940ea6
Merge pull request #1 from strafrecht-admin/upgrade-wagtail-2.14
strafrecht-admin Jul 29, 2025
1c3877a
Fix font loading issues and optimize frontend performance
adechristanto Jul 29, 2025
37813b8
Restore Corporal brand font with fresh font files
adechristanto Jul 29, 2025
e748f38
Update h2, h3, h4 elements to use only 'Roboto Slab' font without fal…
adechristanto Jul 29, 2025
fe9a2a0
Add poll functionality to home page main content area
adechristanto Jul 29, 2025
1006238
Update home poll template to match production server design
adechristanto Jul 29, 2025
bd82b11
Enhance news widgets: fix spacing, add equal heights, clickable title…
adechristanto Jul 30, 2025
e9adc0e
Fix news widget visual inconsistencies: remove comments, improve spac…
adechristanto Jul 30, 2025
d6bf618
Implement tighter spacing in news widgets: remove title margin and ha…
adechristanto Jul 30, 2025
b942bd6
Fix inconsistent spacing and optimize content length in news widgets
adechristanto Jul 30, 2025
981d1f0
Implement comprehensive AWS SES migration for newsletter system
adechristanto Jul 31, 2025
fe3dfbd
Merge remote-tracking branch 'origin/master' into feature/aws-ses-mig…
adechristanto Jul 31, 2025
f71255c
Merge pull request #2 from strafrecht-admin/feature/aws-ses-migration
strafrecht-admin Jul 31, 2025
5b8b443
Update wagtailcomments_xtd submodule with Wagtail 6.x compatibility fix
adechristanto Aug 1, 2025
a744f91
Fix newsletter subscription with AWS SES integration
adechristanto Aug 1, 2025
7d0e543
Consolidate configuration templates and update AWS SES setup
adechristanto Aug 1, 2025
c7a5c44
Remove tags and filter functionality from contact admin
adechristanto Aug 1, 2025
e0e871c
Update requirements files to reflect newly installed dependencies
adechristanto Aug 1, 2025
4fd7754
Fix newsletter unsubscribe URLs for development environment
adechristanto Aug 1, 2025
179cecf
Fix wagtail-birdsong newsletter system issues
adechristanto Aug 1, 2025
7cd71dd
Fix setup_sites command to use HomePage instead of Root page
adechristanto Aug 1, 2025
af6a44c
Enhance setup_sites command to automatically copy menu items
adechristanto Aug 1, 2025
9710f9a
Replace wagtailstreamforms with wagtail-flexible-forms
adechristanto Aug 1, 2025
55f5f67
feat: Add comprehensive Docker containerization support
adechristanto Aug 1, 2025
62096b8
Merge remote-tracking branch 'origin/master' into feature/containeriz…
adechristanto Aug 1, 2025
070f6f6
Merge branch 'origin/feature/abstimmung' into feature/containerization
adechristanto Aug 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 196 additions & 0 deletions .augment/rules/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
---
type: "always_apply"
---

# Wagtail Legacy Application Upgrade Rules

## Project Context
This is a legacy Wagtail Django application requiring systematic upgrade from Wagtail 2.13/Django 3.2 to latest versions. The application includes:
- Custom Wagtail plugins and third-party dependencies
- Webpack-based frontend with Vue.js components
- PostgreSQL database with complex schema
- Production deployment considerations

## Core Upgrade Principles

### 1. SYSTEMATIC VERSION PROGRESSION
- **NEVER** jump directly to latest versions
- Follow incremental upgrade path: Wagtail 2.13 -> 3.0 → 3.0.1 → 3.0.2 → 3.0.3 → 4.0 → 4.1 → 4.2 → 5.0 → 5.1 → 5.2 → 6.0 → latest
- Django upgrades must align: 3.2 → 4.0 → 4.1 → 4.2 → 5.0 → latest
- Test thoroughly at each intermediate version before proceeding

### 2. PRE-UPGRADE REQUIREMENTS
Before ANY version upgrade:
- Create full database backup: `pg_dump -h localhost -p 5434 -U django strafrecht > backup_$(date +%Y%m%d_%H%M%S).sql`
- Document current working state in UPGRADE_LOG.md
- Create git branch for the specific upgrade step: `upgrade-wagtail-X.Y`
- Run full test suite and document results
- Backup media files and static assets

### 3. DEPENDENCY COMPATIBILITY ANALYSIS
Before upgrading core packages:
- Check each dependency in requirements/common.txt for compatibility with target versions
- Use `pip-check-reqs` and `pipdeptree` to analyze dependency conflicts
- Research breaking changes in release notes for ALL dependencies
- Create compatibility matrix in COMPATIBILITY_MATRIX.md
- Identify dependencies that need forking or replacement

### 4. DATABASE MIGRATION SAFETY
- **ALWAYS** test migrations on database copy first
- Use `--dry-run` flag when available
- Create migration rollback scripts before applying
- Document schema changes in MIGRATION_LOG.md
- Never run migrations directly on production without staging validation
- Use `python manage.py sqlmigrate` to review SQL before applying
- Backup database you can find here: /root/backup.sql

### 5. FRONTEND COMPATIBILITY REQUIREMENTS
- Test webpack build after each backend upgrade
- Verify Vue.js component functionality
- Check for breaking changes in:
- Django static file handling
- Wagtail admin interface integration
- API endpoints used by frontend
- Update frontend dependencies in coordination with backend changes
- Maintain separate frontend testing environment

## Specific Technical Guidelines

### Wagtail-Specific Upgrade Rules
- Check Wagtail release notes for breaking changes in:
- StreamField API changes
- Admin interface modifications
- Search backend changes
- Image/document handling updates
- Update custom Wagtail hooks and panels
- Verify wagtail-birdsong newsletter functionality
- Test wagtailmenus and wagtailnews compatibility

### Django Upgrade Considerations
- Update URL patterns for Django 4.0+ (path() vs url())
- Check for deprecated settings and middleware
- Update ASGI configuration if needed
- Verify django-wiki compatibility with newer Django versions
- Test django-channels WebSocket functionality

### Third-Party Plugin Management
- For incompatible plugins, create forks in separate repositories
- Document all custom modifications in CUSTOM_CHANGES.md
- Maintain version pins for forked dependencies
- Consider alternative plugins if maintenance becomes unsustainable

### Code Quality and Testing
- Run `python manage.py check --deploy` after each upgrade
- Use `python manage.py test` for full test suite
- Add integration tests for critical user journeys
- Test admin interface functionality thoroughly
- Verify email newsletter system (birdsong) works correctly

## File and Documentation Requirements

### Required Documentation Files
- `UPGRADE_LOG.md` - Detailed log of each upgrade step
- `COMPATIBILITY_MATRIX.md` - Dependency compatibility analysis
- `MIGRATION_LOG.md` - Database migration tracking
- `CUSTOM_CHANGES.md` - Documentation of all custom modifications
- `ROLLBACK_PROCEDURES.md` - Step-by-step rollback instructions
- `TESTING_CHECKLIST.md` - Comprehensive testing procedures

### Backup and Recovery
- Maintain at least 3 database backups before major upgrades
- Store backups with timestamps and version information
- Test backup restoration procedures
- Document exact restoration steps in ROLLBACK_PROCEDURES.md

### Version Control Strategy
- Create feature branch for each upgrade milestone
- Use descriptive commit messages with version information
- Tag successful upgrade milestones
- Never merge to main without full testing completion

## Error Handling and Rollback

### When Upgrades Fail
- Immediately stop upgrade process
- Document exact error and context in UPGRADE_LOG.md
- Restore from most recent backup
- Analyze root cause before attempting retry
- Consider alternative upgrade paths or dependency replacements

### Rollback Triggers
- Any test failures after upgrade
- Performance degradation > 20%
- Critical functionality broken
- Database migration errors
- Frontend build failures

## Success Criteria for Each Upgrade Step
- All existing tests pass
- No new deprecation warnings
- Frontend builds and functions correctly
- Admin interface fully functional
- Newsletter system operational
- Wiki functionality intact
- Performance maintained or improved
- No security vulnerabilities introduced

## Final Validation Requirements
- Full user acceptance testing
- Performance benchmarking
- Security audit
- Documentation completeness review
- Deployment procedure validation
- Monitoring and alerting setup

## Specific Upgrade Roadmap

### Phase 1: Current State Analysis (Wagtail 4.0, Django 3.2)
- Document all custom code and modifications
- Create comprehensive test coverage for existing functionality
- Identify all third-party dependencies and their versions
- Establish baseline performance metrics

### Phase 2: Django 4.0 Upgrade
- Upgrade Django 3.2 → 4.0
- Update URL patterns and deprecated features
- Test all functionality thoroughly
- Update requirements files

### Phase 3: Wagtail 4.1-4.2 Incremental Upgrades
- Upgrade Wagtail 4.0 → 4.1 → 4.2
- Update Wagtail plugins compatibility
- Test StreamField and admin interface changes
- Verify frontend integration

### Phase 4: Django 4.1-4.2 Alignment
- Upgrade Django to match Wagtail requirements
- Update ASGI configuration
- Test channels and WebSocket functionality

### Phase 5: Wagtail 5.x Series
- Systematic upgrade through Wagtail 5.x versions
- Major API changes handling
- Frontend compatibility verification
- Performance optimization

### Phase 6: Latest Version Migration
- Final upgrade to current stable versions
- Security hardening
- Performance optimization
- Documentation finalization

## Critical Dependencies to Monitor
- wagtail-birdsong (newsletter system)
- django-wiki (wiki functionality)
- wagtailmenus (navigation)
- wagtailnews (news system)
- django-channels (WebSocket)
- Vue.js frontend components

## Emergency Procedures
- Keep production system on stable version during upgrades
- Maintain parallel staging environment for testing
- Have immediate rollback capability ready
- Monitor system health continuously during upgrades

Remember: Patience and systematic approach prevent data loss and system downtime. Each upgrade step should be treated as a separate project with its own planning, execution, and validation phases.
169 changes: 169 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Git and version control
.git
.gitignore
.gitmodules
.gitattributes

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
venv/
env/
ENV/
env.bak/
venv.bak/
.venv/

# Node.js and frontend
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.npm
.yarn-integrity
frontend/node_modules/
frontend/build/
frontend/dist/

# IDE and editors
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store
Thumbs.db

# Logs
*.log
log/
logs/
*.log.*

# Database
*.db
*.sqlite3
*.sqlite
db.sqlite3

# Media and static files (will be generated in container)
media/
staticfiles/
static/collected/

# Backups
backups/
*.sql
*.dump

# Environment files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
.coverage
.pytest_cache/
.tox/
.nox/
htmlcov/
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Documentation
docs/_build/
.readthedocs.yml

# Temporary files
tmp/
temp/
*.tmp
*.temp

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Docker
Dockerfile*
docker-compose*.yml
.dockerignore

# Development and deployment
.gitpod.yml
.gitpod.Dockerfile
Procfile
runtime.txt

# Package files
*.tar.gz
*.zip
*.rar

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# pipenv
Pipfile.lock

# PEP 582
__pypackages__/

# Celery
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
Loading