Commit Graph

76 Commits

Author SHA1 Message Date
a06a73c2f7 fix: correct method name tryFromHost in HttpRouter 2025-11-03 13:03:50 +01:00
35ce316f98 chore: update HttpRouter 2025-11-03 12:50:19 +01:00
ee06cbbbf1 chore: update console components, logging, router and add subdomain support 2025-11-03 12:44:39 +01:00
6d355c9897 refactor(logging): update context manager and log path configuration
- Replace `environment` with `type` for global context data
- Update default log directory path from `storage/logs` to `logs`
- Comment out Nginx log paths to disable by default
- Change `DockerJsonHandler` contract from `FormattableHandler` to `LogHandler`
2025-11-03 01:43:38 +01:00
d90f4386d9 Make sure port is read as int from environment 2025-11-03 01:06:36 +01:00
a60b4b6ac2 fix: Allow root to read Docker Secret files with restrictive permissions
- Remove is_readable() check when running as root
- Root can read files even with 0700 permissions
- Should fix issue where REDIS_PASSWORD file exists but is not readable (0700, owner 1000, process 0)
- Docker secrets may have restrictive permissions that root can bypass
2025-11-03 01:05:13 +01:00
4be249a57b fix: Normalize Docker Secret file paths to support both formats
- Handle paths like /redis_password and convert to /run/secrets/redis_password
- Docker Swarm may set *_FILE variables with just the secret name
- Add file permission debugging to diagnose read issues
- Should fix issue where REDIS_PASSWORD_FILE points to /redis_password instead of /run/secrets/redis_password
2025-11-03 00:57:20 +01:00
b070767d0a refactor: simplify Redis configuration initialization
- Use RedisConfig::fromEnvironment() in LoggerInitializer
- Remove fallback logic in QueueInitializer, always use connection pool
- Make RedisConfig constructor private
- Clean up Redis connection error message
2025-11-03 00:43:28 +01:00
7a2cb0b63e fix: staging deployment configuration and redis secrets handling 2025-11-03 00:15:43 +01:00
0c4ff1283c fix: Add workaround for REDIS_PASSWORD_FILE not being set by Docker Compose
- Manually set REDIS_PASSWORD_FILE if file exists but variable is not set
- Handles cases where Docker Compose doesn't set the variable correctly
- Should fix issue where REDIS_PASSWORD_FILE is missing even though configured
2025-11-02 22:48:10 +01:00
73de91c2d3 debug: Add logging for all *_FILE environment variables
- Log all *_FILE variables from getenv() and $_ENV
- Help diagnose why REDIS_PASSWORD_FILE is not set
- Check if other *_FILE variables are present
2025-11-02 22:38:27 +01:00
64400a317b debug: Add extended Docker Secrets debugging
- Check getenv(), $_ENV and $_SERVER for REDIS_PASSWORD_FILE
- Check if /run/secrets/redis_password file exists
- Help diagnose why REDIS_PASSWORD_FILE is not in environment
2025-11-02 22:25:13 +01:00
14900940c5 debug: Add Docker Secrets debugging to AppBootstrapper
- Add debug logging for REDIS_PASSWORD_FILE and REDIS_PASSWORD
- Check if REDIS_PASSWORD_FILE exists and has correct value
- Check if secret file exists and is readable
- Help diagnose why REDIS_PASSWORD_FILE is not in logs
2025-11-02 22:17:10 +01:00
bd9df7e630 fix: Don't store empty values when Docker Secret resolution fails in all()
- Update all() first pass to skip storing empty values when secret resolution fails
- Ensures second pass can still resolve secrets from *_FILE variables
- Prevents empty values from blocking secret resolution in second pass
- Should fix issue where REDIS_PASSWORD was empty even though REDIS_PASSWORD_FILE existed
2025-11-02 21:58:40 +01:00
c530fbf8f1 fix: Resolve Docker Secrets from *_FILE variables even if base variable is missing
- Update all() method to check for *_FILE variables and resolve their base variables
- Ensures APP_KEY, DB_PASSWORD, etc. are resolved even if they don't exist in the array
- Two-pass approach: first processes existing variables, second checks for *_FILE patterns
- Fixes issue where APP_KEY was empty even though APP_KEY_FILE existed
2025-11-02 21:52:04 +01:00
0912df0537 fix: Resolve Docker Secrets in all() method for empty variables
- Update all() to automatically resolve Docker Secrets (*_FILE pattern) for empty variables
- Ensures DB_PASSWORD, REDIS_PASSWORD, etc. are resolved from their *_FILE counterparts when empty
- Variables like DB_PASSWORD_FILE are still included in output, but empty values are replaced with resolved secrets
- Fixes issue where DB_PASSWORD and REDIS_PASSWORD appeared empty in logs even though *_FILE variables existed
2025-11-02 21:36:07 +01:00
0a5d0ecd0c fix: Allow Docker Secrets to override empty environment variables
- Update get() method to treat empty strings as 'not set' for Docker Secrets resolution
- Allows Docker Secrets (*_FILE pattern) to override empty values
- Preserves original behavior: explicitly set empty strings are still returned
- Fixes issue where RAPIDMAIL_USERNAME and RAPIDMAIL_PASSWORD appear empty even when Docker Secrets are available
2025-11-02 21:26:07 +01:00
fce990f3b5 fix: Make all() method dynamically check system environment variables
- Update all() to merge internal variables with system environment variables
- Ensures variables set after initialization (e.g., by PHP-FPM) are included
- Internal variables take precedence over system variables
- Fixes issue where RAPIDMAIL_USERNAME and RAPIDMAIL_PASSWORD were missing in all() output
2025-11-02 21:18:48 +01:00
d2ee59bd65 fix: Fix environment variables not being captured correctly in PHP-FPM
- Fix priority order in loadSystemEnvironment() to check  and  first
- Add dynamic fallback in Environment::get() to handle variables set after initialization
- Ensure all environment variables are captured during bootstrap, including those set dynamically by PHP-FPM/FastCGI

Fixes issue where environment variables like RAPIDMAIL_USERNAME and RAPIDMAIL_PASSWORD were missing during bootstrap but available later in request processing.
2025-11-02 21:11:29 +01:00
24cbbccf4c feat: update deployment configuration and encrypted env loader
- Update Ansible playbooks and roles for application deployment
- Add new Gitea/Traefik troubleshooting playbooks
- Update Docker Compose configurations (base, local, staging, production)
- Enhance EncryptedEnvLoader with improved error handling
- Add deployment scripts (autossh setup, migration, secret testing)
- Update CI/CD workflows and documentation
- Add Semaphore stack configuration
2025-11-02 20:38:06 +01:00
7b7f0b41d2 chore: update VPN routing configuration and add Grafana VPN documentation 2025-11-02 18:10:04 +01:00
2dd8468d70 chore: add separator line to environment logging output 2025-11-02 16:25:58 +01:00
8344032fb6 feat: add Redis connection diagnostics, VPN routing fixes, and Traefik middleware updates 2025-11-02 15:58:30 +01:00
edcf509a4f feat: add PHP ini management system and update infrastructure configs
- Add PHP ini management classes (Access, IniDirective, IniKey, PhpIni)
- Update deployment configurations (Wireguard, Traefik, Monitoring)
- Add DNS stack and Ansible role
- Add deployment debugging playbooks
- Update framework components (FilePath, RedisConnectionPool)
- Update .gitignore and documentation
2025-11-02 15:29:41 +01:00
e598309c48 feat: improve WireGuard client management and framework initialization
- Improve WireGuard client IP calculation logic (find next available IP)
- Add local wireguard-clients directory for storing client configs
- Integrate Redis pool into CacheInitializer
- Improve ContainerBootstrapper with better imports and Redis pool
- Add monitoring role tags for better task organization
- Update WireGuard documentation
- Store generated WireGuard client configs locally
2025-11-02 03:29:23 +01:00
4cec6dd8a0 fix: improve Redis connection error messages and add staging troubleshooting playbooks
- Improve Redis connection error message to include password info
- Add Ansible playbooks for staging 502 error troubleshooting
  - check-staging-status.yml: Check nginx logs and upstream config
  - fix-staging-502-verify.yml: Fix and verify nginx upstream configuration
2025-11-02 02:16:12 +01:00
70875be4b9 fix(redis): include host in connection error message 2025-11-02 02:06:29 +01:00
0d16417888 fix(redis): include database in connection error message 2025-11-02 02:04:28 +01:00
efbdbcb468 chore: Handler-Name zum Log-Output in DefaultLogger hinzufügen 2025-11-02 01:46:59 +01:00
cf0ad6e905 refactor: improve logging system and add deployment fixes
- Enhance logging handlers (Console, DockerJson, File, JsonFile, MultiFile)
- Improve exception and line formatters
- Update logger initialization and processor management
- Add Ansible playbooks for staging 502 error troubleshooting
- Update deployment documentation
- Fix serializer and queue components
- Update error kernel and queued log handler
2025-11-02 01:37:49 +01:00
2defdf2baf chore: update staging branch with current changes 2025-11-02 00:05:26 +01:00
fa28e3580a fix(ci): add image tag fallback logic and code style fixes
- Add fallback to 'latest' tag when build fails
- Add fallback mechanism when pulling specific image tag fails
- Fix code style: move opening brace in ObjectInfo
- Remove unused comment in ObjectStorage
2025-11-01 22:06:12 +01:00
477522bc1e feat: add ObjectStorage and ObjectInfo framework components
- Add ObjectStorage and ObjectInfo classes for framework storage
- Update build-image.yml workflow configuration
2025-11-01 21:53:23 +01:00
b76064d94a fix: stabilise staging sync 2025-11-01 19:42:27 +01:00
5a79646daf chore: sync staging workspace 2025-11-01 19:02:09 +01:00
a441da37f6 feat: implement exception handling system with error context and policies 2025-11-01 15:46:43 +01:00
e105afb23c fix: Update DefaultContainer if needed 2025-11-01 00:28:33 +01:00
d2b7fc96fc fix: Update ErrorAggregationInitializer
Fix DI binding issues for ErrorAggregatorInterface
2025-11-01 00:25:13 +01:00
d84c5dbacb refactor: Framework code cleanup and improvements
- DI dependency graph improvements
- Database connection updates
- HTTP middleware chain optimizations
- Routing middleware cleanup
2025-10-31 23:38:23 +01:00
9e39a7b14e chore: Make RapidMail Credentials non required. 2025-10-31 23:34:36 +01:00
957f43aac4 Fix: Update QueueInitializer to use Redis connection pool and explicit parameters
- Use RedisConnectionPool when available for consistency
- Use named parameters when creating RedisQueue to prevent parameter confusion
- Fix RedisQueue constructor error where strings were passed instead of connection object
2025-10-31 11:17:15 +01:00
fc81379575 chore: Bootstrap fix 2025-10-31 10:35:35 +01:00
ba9d9bb882 test: trigger workflow after Actions activation 2025-10-31 03:11:25 +01:00
948305b7c9 test: trigger deployment workflow (non-markdown change) 2025-10-31 03:00:13 +01:00
e26eb2aa12 feat: CI/CD pipeline setup complete - Ansible playbooks updated, secrets configured, workflow ready 2025-10-31 01:39:24 +01:00
2a7b90312f chore(deploy): add prod env template, improve ansible deploy, prune old workflows
- Add deployment/ansible/templates/.env.production.j2 used by secrets playbook
- Enhance deploy-update.yml to read registry creds from vault or CI
- Update production-deploy workflow to pass registry credentials to Ansible
- Remove obsolete GitHub-style workflows under .gitea (conflicted naming)

Why: make the production pipeline executable end-to-end with Ansible and
consistent secrets handling; avoid legacy CI configs interfering.
2025-10-30 21:38:28 +01:00
d021c49906 fix(Docker): change ENV arg from 'prod' to 'production' to match actual ini filename 2025-10-29 23:26:45 +01:00
70e45fb56e fix(Discovery): Add comprehensive debug logging for router initialization
- Add initializer count logging in DiscoveryServiceBootstrapper
- Add route structure analysis in RouterSetup
- Add request parameter logging in HttpRouter
- Update PHP production config for better OPcache handling
- Fix various config and error handling improvements
2025-10-27 22:23:18 +01:00
e326e3d6c6 fix(Middleware): Disable RateLimitMiddleware temporarily
- Commented out RateLimitMiddleware in MiddlewareManager
- RateLimit system not fully implemented yet (missing Storage, Initializer)
- Added ENV_SETUP.md documentation for .env file structure
- Website was returning HTTP 500 due to missing StorageInterface binding

TODO: Implement complete RateLimit system with Storage interface and DI bindings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 19:29:38 +01:00
5d9258d8c3 chore: RateLimiter fixes 2025-10-27 19:23:22 +01:00