Commit Graph

14 Commits

Author SHA1 Message Date
SysAdmin Agent
8de3106596 Switch GrampsWeb from subpath to subdomain ahnenforschung.vhtv-stiftung.de (STI-91)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The subpath approach (/ahnenforschung/) required ~15 nginx sub_filter
rules to rewrite JS/CSS/HTML paths, causing persistent issues with
font loading, Service Worker, and API routes. GrampsWeb is not designed
for subpath deployment.

Switch to dedicated subdomain where GrampsWeb runs on root /:
- nginx.conf: remove all sub_filter rules, add clean subdomain server block
- base.html: update sidebar link to subdomain URL
- compose.yml: update GRAMPSWEB_BASE_URL default
- env-template.txt: update BASE_URL reference

After deploy: run certbot for ahnenforschung.vhtv-stiftung.de SSL cert,
update .env GRAMPSWEB_BASE_URL, restart containers.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 16:37:19 +00:00
SysAdmin Agent
a9201138c2 Fix nginx: add location block for double fonts/ path in GrampsWeb (STI-91)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
GrampsWeb's fonts.css references url('fonts/file.woff2') but is served
from /ahnenforschung/fonts/fonts.css, causing the browser to request
/ahnenforschung/fonts/fonts/file.woff2 (double fonts/ directory).

Instead of relying on sub_filter to rewrite CSS content, add a dedicated
location block that proxies /ahnenforschung/fonts/fonts/ to the correct
/fonts/ path on the GrampsWeb container. This is more robust as it works
regardless of CSS content-type matching.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 11:36:59 +00:00
SysAdmin Agent
ebaaf3dad3 Fix nginx: rewrite font paths in CSS to prevent double fonts/ directory (STI-91)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
GrampsWeb's fonts.css references fonts as url('fonts/MaterialIcons.woff2').
Since fonts.css is served from /ahnenforschung/fonts/fonts.css, the browser
resolves this to /ahnenforschung/fonts/fonts/MaterialIcons.woff2 (double
fonts/ directory). Strip the fonts/ prefix via sub_filter so the URL
resolves correctly to /ahnenforschung/fonts/MaterialIcons.woff2.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 11:25:47 +00:00
SysAdmin Agent
1429357924 Fix nginx: remove broken font path rewrite that caused double fonts/ in URL (STI-91)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The sub_filter rule '../fonts/' -> 'fonts/' was rewriting relative font
paths in CSS served from /ahnenforschung/fonts/fonts.css. This caused
the browser to resolve font URLs to /ahnenforschung/fonts/fonts/MaterialIcons.woff2
(double fonts/ directory). The original ../fonts/ paths resolve correctly
from the subpath without rewriting.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-05 10:45:49 +00:00
SysAdmin Agent
3c7c472e64 Fix nginx: add text/javascript to sub_filter_types for GrampsWeb subpath rewriting (STI-91)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
GrampsWeb serves JS files with Content-Type text/javascript, but nginx
sub_filter_types only listed application/javascript. This caused JS bundles
to pass through without path rewriting, resulting in API calls going to
/api/ instead of /ahnenforschung/api/ (404 errors on login).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-04 22:05:42 +00:00
SysAdmin Agent
32acc9886f Fix nginx: remove redundant text/html from sub_filter_types (STI-102)
nginx includes text/html by default for sub_filter — adding it explicitly
causes a duplicate MIME type warning on reload.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-03 23:02:47 +00:00
SysAdmin Agent
b79de1d9dd Refactor GrampsWeb subpath handling: move all patching to nginx sub_filter (STI-98)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
Replace fragile container-side sed/JS patching with comprehensive nginx sub_filter
rules. The container now only handles admin user creation on startup. All SPA route
prefixing is done in nginx via a History API interceptor injected into HTML responses.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-03 21:19:11 +00:00
SysAdmin Agent
951c434ef2 Fix GrampsWeb subpath: use nginx sub_filter for <base href> rewrite (STI-93)
Some checks failed
CI/CD Pipeline / deploy (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
GrampsWeb's SPA has <base href="/"> hardcoded at build time. The
GRAMPSWEB_BASE_URL env var is a full URL for API/OIDC, not a path prefix.
This means assets always load from root, hitting Django instead of GrampsWeb.

Fix: nginx sub_filter rewrites <base href="/"> to <base href="/ahnenforschung/">
so the browser resolves all SPA assets under the correct subpath.

Also revert BASE_URL default to a proper URL (not a path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 23:23:28 +00:00
SysAdmin Agent
5807bf85f1 GrampsWeb Phase 1: Production Compose, Reverse Proxy & Deployment (STI-91)
- Fix grampsweb port mapping: 8090:80 → 8090:5000 (gunicorn, not nginx)
- Add full subpath ENV vars: GRAMPSWEB_TREE, BASE_URL, STATIC_PATH, STATIC_URL
- Add Celery/Redis config: broker_url, result_backend, ratelimit storage
- Add GRAMPSWEB_NEW_DB_BACKEND=sqlite
- Add depends_on: redis and restart: unless-stopped
- Add GRAMPS_URL/USERNAME/PASSWORD/API_TOKEN to web service for Django integration
- Add nginx.conf with /ahnenforschung/ reverse proxy route (proxy to localhost:8090)
- Add GRAMPSWEB_STATIC_PATH and GRAMPSWEB_STATIC_URL to env-template.txt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:47:52 +00:00
Stiftung Development
a6559daeb1 Clean up docker-compose configuration
- Archive deploy-production directory as deploy-production-archived (legacy)
- Add DOCKER_COMPOSE_README.md for documentation
- Main configuration now uses compose.yml with working Paperless integration
- Paperless API URL configured as https://vhtv-stiftung.de/paperless
2025-09-17 13:19:35 +02:00
Stiftung Development
fa6d1b64df Add Paperless-ngx to production deployment
- Add Paperless-ngx service to Docker Compose configuration
- Configure nginx routing for /paperless/ path with large file support
- Add production environment variables for Paperless
- Create automated setup script for initial Paperless configuration
- Add comprehensive production setup documentation
- Configure Paperless with HTTPS and proper database setup
- Update Django app to use production Paperless instance
2025-09-09 22:00:32 +02:00
Stiftung Development
236e1d2ad2 Add HTTPS/SSL security configuration
- Update nginx config for HTTPS with Let's Encrypt certificates
- Add HTTP to HTTPS redirect
- Configure SSL security headers and HSTS
- Add Django HTTPS security settings for production
- Fix proxy_pass to use correct port 8081
- Enhance Content Security Policy for HTTPS
2025-09-09 21:46:19 +02:00
Stiftung Development
edfb233348 Fix environment variable handling for production deployment
- Update settings.py to support both ALLOWED_HOSTS and DJANGO_ALLOWED_HOSTS
- Add production CSRF_TRUSTED_ORIGINS for vhtv-stiftung.de
- Update env-template.txt with production variable examples
- Improve compatibility between development and production environments
2025-09-09 21:02:21 +02:00
Stiftung Development
ab23d7187e feat: add comprehensive GitHub workflow and development tools 2025-09-06 18:31:54 +02:00