Commit Graph

425 Commits

Author SHA1 Message Date
c93d3f07a2 fix(Console): add void as valid return type for command methods
All checks were successful
Test Runner / test-php (push) Successful in 31s
Deploy Application / deploy (push) Successful in 1m42s
Test Runner / test-basic (push) Successful in 7s
The MethodSignatureAnalyzer was rejecting command methods with void return
type, causing the schedule:run command to fail validation.
2025-11-26 06:16:09 +01:00
386baff65f fix(staging): correct command names for scheduler and queue-worker
All checks were successful
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 1m43s
- scheduler: scheduler:run → schedule:run (correct console command)
- queue-worker: console.php queue:work → worker.php (standalone script)
2025-11-25 23:29:31 +01:00
7f7029ae2a fix(staging): add APP_KEY_FILE environment variable to scheduler and queue-worker
All checks were successful
Test Runner / test-basic (push) Successful in 7s
Test Runner / test-php (push) Successful in 7s
Deploy Application / deploy (push) Successful in 1m46s
The scheduler and queue-worker containers were crashing with
RequiredEnvironmentVariableException because the APP_KEY_FILE
environment variable was not set, even though the app_key secret
was mounted. The Framework's Environment class needs the *_FILE
pattern to read Docker Secrets.
2025-11-25 22:45:23 +01:00
22fd89b013 fix(ErrorBoundaries): use Environment class instead of direct $_ENV access
All checks were successful
Test Runner / test-basic (push) Successful in 9s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 1m40s
Replace direct $_ENV/$_SERVER access with framework's Environment class
to follow proper framework patterns and enable Docker Secrets support.

Changes:
- Add Environment and EnvKey imports
- Use $container->get(Environment::class) for environment access
- Replace $_ENV['APP_ENV'] with $env->getString(EnvKey::APP_ENV, ...)
- Rename internal method to registerServices for clarity
- Add documentation explaining the pattern

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 19:44:02 +01:00
85e2360a90 fix(deploy): improve deployment robustness and reliability
All checks were successful
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 7s
Deploy Application / deploy (push) Successful in 1m35s
- Add docker volume prune to deploy.sh to prevent stale code issues
- Add automatic migrations and cache warmup to staging entrypoint
- Fix nginx race condition by waiting for PHP-FPM before starting
- Improve PHP healthcheck to use php-fpm-healthcheck
- Add curl to production nginx Dockerfile for healthchecks
- Add ensureSeedsTable() to SeedRepository for automatic table creation
- Update SeedCommand to ensure seeds table exists before operations

This prevents 502 Bad Gateway errors during deployment and ensures
fresh code is deployed without volume cache issues.
2025-11-25 17:44:44 +01:00
7785e65d08 fix(security): prevent debug error pages on staging/production
All checks were successful
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 7s
Deploy Application / deploy (push) Successful in 1m28s
Root cause: ExceptionHandlingInitializer attempted to autowire
EnvironmentType directly, but it was never registered in the DI
container. This caused the debug mode resolution to fail silently.

Changes:
- Use TypedConfiguration instead of EnvironmentType for proper DI
- Create ErrorHandlingConfig value object to centralize config
- Access debug mode via AppConfig.isDebugEnabled() which respects
  both APP_DEBUG env var AND EnvironmentType.isDebugEnabled()
- Register ErrorHandlingConfig as singleton in container
- Remove diagnostic logging from ResponseErrorRenderer

This ensures that staging/production environments (where
EnvironmentType != DEV) will not display stack traces, code context,
or file paths in error responses.
2025-11-25 15:01:40 +01:00
520d082393 chore: add diagnostic logging for debug mode verification
All checks were successful
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 1m33s
This temporary logging will help verify that:
- EnvironmentType is correctly detected as STAGING
- isDebugEnabled() returns false for STAGING
- ResponseErrorRenderer receives isDebugMode=false

Remove after verification is complete.
2025-11-25 14:44:05 +01:00
f9063aa151 fix: wire debug flag into error kernel
All checks were successful
Test Runner / test-php (push) Successful in 27s
Deploy Application / deploy (push) Successful in 59s
Test Runner / test-basic (push) Successful in 6s
2025-11-25 04:36:19 +01:00
4309ea7972 fix(staging): hardcode APP_DEBUG=false to prevent env override
All checks were successful
Test Runner / test-php (push) Successful in 30s
Deploy Application / deploy (push) Successful in 59s
Test Runner / test-basic (push) Successful in 6s
Changed APP_DEBUG from ${APP_DEBUG:-false} to hardcoded false value
in all 4 services (php, nginx, queue-worker, scheduler).

This prevents any server-side .env or environment variables from
accidentally enabling debug mode in staging, which was causing
detailed error pages to be displayed.
2025-11-25 04:33:46 +01:00
26f87060d5 fix(deploy): add build parameter to ensure Docker images are rebuilt
All checks were successful
Test Runner / test-php (push) Successful in 41s
Deploy Application / deploy (push) Successful in 2m58s
Test Runner / test-basic (push) Successful in 7s
The deployment was only pulling code via git but not rebuilding the
Docker images, causing containers to run with stale code from the
registry image. This fixes the debug error pages still showing on
staging despite APP_DEBUG=false.
2025-11-25 04:23:38 +01:00
dd7cfd97e6 feat: improve stack trace rendering 2025-11-25 04:13:25 +01:00
57eabe30a5 fix(security): change ErrorRendererFactory isDebugMode default to false
All checks were successful
Test Runner / test-basic (push) Successful in 7s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 43s
Change the default value of $isDebugMode constructor parameter from
true to false, following the security-by-default principle. This ensures
that even if the factory is instantiated without explicit debug mode
configuration, it won't leak sensitive debugging information like
stack traces, file paths, and code context.
2025-11-25 04:09:41 +01:00
77505edabf refactor(csrf): replace error_log with debugLog for structured logging
All checks were successful
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 45s
Replace raw error_log() calls with framework's debugLog() method for:
- Consistent structured logging with context data
- Sensitive data hashing (tokens, session IDs)
- Debug-mode awareness (only logs when debug enabled)
2025-11-25 03:52:57 +01:00
68a59f460f fix(staging): set APP_DEBUG default to false for security
All checks were successful
Deploy Application / deploy (push) Successful in 24s
Test Runner / test-php (push) Successful in 28s
Test Runner / test-basic (push) Successful in 7s
Staging environment should not expose detailed error messages,
stack traces, or debug information to end users.

Changed default from 'true' to 'false' in all services:
- php
- nginx
- queue-worker
- scheduler
2025-11-25 03:47:29 +01:00
2d762eafdf fix(deploy): add warning messages for missing Docker secrets 2025-11-25 03:13:30 +01:00
760690549d fix(deploy): escape shell variables in docker-compose YAML
Shell variables like $SECRETS_DIR in docker-compose command blocks
must be escaped as $$SECRETS_DIR. Without escaping, docker-compose
interprets them as environment variable interpolation and expands
them to empty strings, causing:
- mkdir: cannot create directory ''
- Secrets copied to wrong path (/redis_password instead of /var/www/html/storage/secrets/redis_password)
- PHP TypeError: RedisConfig::__construct() argument #3 must be string, null given

The fix applies $$ escaping to all shell variables in the PHP
service entrypoint script.
2025-11-25 03:07:26 +01:00
417c7d7a7d fix(staging): correct nginx upstream sed patterns for production-php
All checks were successful
Test Runner / test-basic (push) Successful in 9s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 43s
- Add explicit sed pattern for production-php:9000 → php:9000
- Fix character class [a-f0-9_]* to [a-zA-Z0-9_-]* to match full container names
- Loop over both sites-enabled and sites-available configs
- Add fastcgi_pass replacement for production-php
2025-11-24 22:44:43 +01:00
5e74ce73a6 fix(deploy): force remove containers before deployment
All checks were successful
Test Runner / test-basic (push) Successful in 9s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Successful in 43s
The --force-recreate flag alone doesn't handle containers that exist
outside the compose project context. Now explicitly:
1. Run docker compose down first
2. Force remove any orphaned containers with known names
3. Then create fresh containers
2025-11-24 22:10:38 +01:00
6c266861ec fix(deploy): add --force-recreate --remove-orphans to handle container conflicts
Some checks failed
Test Runner / test-basic (push) Successful in 9s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Failing after 30s
Fixes deployment error where existing containers with same name
blocked recreation. This ensures clean deployments by:
- Force recreating containers even if unchanged
- Removing orphan containers not in compose file
2025-11-24 22:07:50 +01:00
1f93377ded fix(ci): use IP address instead of hostname for SSH (DNS not available in runner)
Some checks failed
Test Runner / test-basic (push) Successful in 7s
Test Runner / test-php (push) Successful in 7s
Deploy Application / deploy (push) Failing after 33s
2025-11-24 22:05:15 +01:00
5c36517046 fix(ci): hardcode SSH host/user, only key needs to be secret
Some checks failed
Test Runner / test-basic (push) Successful in 7s
Test Runner / test-php (push) Successful in 8s
Deploy Application / deploy (push) Failing after 35s
2025-11-24 22:03:12 +01:00
4d0328bfe3 fix(ci): use correct secret name SSH_PRIVATE_KEY
Some checks failed
Deploy Application / deploy (push) Failing after 8s
Test Runner / test-basic (push) Successful in 7s
Test Runner / test-php (push) Successful in 26s
2025-11-24 22:01:43 +01:00
4cadd7ce1c fix(ci): use php-ci runner for deploy job (has SSH installed)
Some checks failed
Deploy Application / deploy (push) Failing after 8s
Test Runner / test-basic (push) Successful in 8s
Test Runner / test-php (push) Successful in 7s
2025-11-24 21:56:42 +01:00
abe68af124 fix(ci): replace actions/checkout with manual git checkout
Some checks failed
Deploy Application / deploy (push) Failing after 8s
Test Runner / test-basic (push) Successful in 7s
Test Runner / test-php (push) Successful in 33s
The Gitea Actions Runner doesn't have Node.js installed, causing
actions/checkout@v3 (a JavaScript action) to fail with
"Cannot find: node in PATH".

Replace with native shell-based git checkout that works without
Node.js and uses Gitea context variables for repository URL.
2025-11-24 21:54:27 +01:00
a0762623bc test: Add test workflow for Gitea Actions Runner
Some checks failed
Test Runner / test-php (push) Failing after 21s
Deploy Application / deploy (push) Failing after 10s
Test Runner / test-basic (push) Failing after 0s
2025-11-24 21:41:02 +01:00
77abc65cd7 fix: DockerSecretsResolver - don't normalize absolute paths like /var/www/html/...
Some checks failed
Deploy Application / deploy (push) Has been cancelled
2025-11-24 21:28:25 +01:00
4eb7134853 feat(deploy): add Gitea CI/CD workflows and production Docker Compose config
- Add staging deployment workflow (deploy-staging.yml)
- Add production deployment workflow (deploy-production.yml)
- Add workflow documentation (README.md)
- Add secrets setup guide (SECRETS_SETUP_GUIDE.md)
- Add production Docker Compose configuration (docker-compose.prod.yml)

Workflows implement automated deployment with SSH-based remote execution,
health checks, rollback on failure, and smoke testing.
2025-11-24 18:37:27 +01:00
8f3c15ddbb fix(console): comprehensive TUI rendering fixes
- Fix Enter key detection: handle multiple Enter key formats (\n, \r, \r\n)
- Reduce flickering: lower render frequency from 60 FPS to 30 FPS
- Fix menu bar visibility: re-render menu bar after content to prevent overwriting
- Fix content positioning: explicit line positioning for categories and commands
- Fix line shifting: clear lines before writing, control newlines manually
- Limit visible items: prevent overflow with maxVisibleCategories/Commands
- Improve CPU usage: increase sleep interval when no events processed

This fixes:
- Enter key not working for selection
- Strong flickering of the application
- Menu bar not visible or being overwritten
- Top half of selection list not displayed
- Lines being shifted/misaligned
2025-11-10 11:06:07 +01:00
6bc78f5540 fix(console): improve TUI rendering - fix menu bar display and category formatting
- Fix TuiRenderer rendering: correct line positioning for categories
- Fix category item formatting: remove tabs, ensure consistent spacing
- Improve clearContentArea: preserve menu bar (lines 2-3) when clearing content
- Add ConsoleContext: mutable context container for readonly ConsoleOutput
- Add context awareness to ConsoleOutput: setContext/getContext/isInTuiContext
- Auto-detect TUI context in InteractivePrompter: automatically set LayoutAreas
- Set TUI context in TuiFactory and TuiCommandExecutor
- Add tests for TuiRenderer: menu bar preservation, category formatting

This fixes rendering issues where:
- Menu bar was not displayed or overwritten
- Category items had tab/space misalignment
- Content area clearing overwrote the menu bar
2025-11-10 02:42:46 +01:00
2d53270056 feat(cms,asset): add comprehensive test suite and finalize modules
- Add comprehensive test suite for CMS and Asset modules using Pest Framework
- Implement ContentTypeService::delete() protection against deletion of in-use content types
- Add CannotDeleteContentTypeInUseException for better error handling
- Fix DerivatPipelineRegistry::getAllPipelines() to handle object uniqueness correctly
- Fix VariantName::getScale() to correctly parse scales with file extensions
- Update CMS module documentation with new features, exceptions, and test coverage
- Add CmsTestHelpers and AssetTestHelpers for test data factories
- Fix BlockTypeRegistry to be immutable after construction
- Update ContentTypeService to check for associated content before deletion
- Improve BlockRendererRegistry initialization

Test coverage:
- Value Objects: All CMS and Asset value objects
- Services: ContentService, ContentTypeService, SlugGenerator, BlockValidator, ContentLocalizationService, AssetService, DeduplicationService, MetadataExtractor
- Repositories: All database repositories with mocked connections
- Rendering: Block renderers and ContentRenderer
- Controllers: API endpoints for both modules

254 tests passing, 38 remaining (mostly image processing pipeline tests)
2025-11-10 02:12:28 +01:00
74d50a29cc fix(console): improve InteractiveMenu rendering with layout-aware system
- Add LayoutAreas and LayoutArea value objects for coordinated screen rendering
- Add ScreenRendererInterface for testable screen operations
- Extend ScreenManager with clearContentArea() for selective clearing
- Refactor InteractiveMenu to support LayoutAreas via setLayoutAreas()
- Add prepareScreen() method that handles both standalone and layout-aware modes
- Fix cursor positioning to prevent menu bar overwriting
- Add comprehensive tests for layout areas and rendering behavior

This fixes rendering issues where InteractiveMenu would overwrite the menu bar
and cause misalignment of menu items when used within TUI layouts.
2025-11-10 02:00:41 +01:00
43dd602509 test: add comprehensive tests for Discovery module components
- Add tests for Results registries (AttributeRegistry, InterfaceRegistry, TemplateRegistry)
- Add tests for Processing components (ProcessingContext)
- Add tests for Memory components (MemoryGuard)
- Add tests for Value Objects (DiscoveryOptions, DiscoveryContext)

All new tests pass and cover core functionality including:
- Registry operations (add, get, has, serialize/deserialize, optimize)
- Processing context (reflection caching, file context management)
- Memory guard (memory checks, statistics, emergency cleanup)
- Value objects (factory methods, scan types, cache keys, metrics)
2025-11-10 01:39:57 +01:00
9289344379 feat(gitea): Migrate configuration from environment variables to app.ini
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 1m12s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
🧊 Warm Docker Build Cache / Refresh Buildx Caches (push) Has been cancelled
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 25s
System Maintenance / Run Ansible System Maintenance (push) Successful in 1m8s
📊 Monitor Workflow Performance / Monitor Workflow Performance (push) Failing after 35s
Security Vulnerability Scan / Composer Security Audit (push) Failing after 27s
- Move all Gitea configuration from docker-compose.yml environment variables to app.ini
- Enable Redis cache with proper connection string format (redis://)
- Fix Redis password to use Gitea Redis instance password (gitea_redis_password) instead of application Redis stack password
- Add database connection pool settings to prevent timeout errors
- Configure Redis for cache, session, and queue using app.ini
- Update Ansible task to use correct Redis password for Gitea Redis instance

Benefits:
- Cache now works correctly (environment variables had a bug in Gitea 1.25)
- All settings are versioned in Git
- Better maintainability and reliability
- Configuration follows Gitea documentation recommendations
2025-11-09 16:33:35 +01:00
36ef2a1e2c fix: Gitea Traefik routing and connection pool optimization
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues)
- Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s)
- Add explicit service reference in Traefik labels
- Fix intermittent 504 timeouts by improving PostgreSQL connection handling

Fixes Gitea unreachability via git.michaelschiemer.de
2025-11-09 14:46:15 +01:00
85c369e846 refactor(console): extract responsibilities from ConsoleApplication
- Extract terminal compatibility checking to TerminalCompatibilityChecker
- Extract input validation to ConsoleInputValidator
- Extract command categorization to CommandCategorizer
- Extract result processing to CommandResultProcessor
- Extract help rendering to ConsoleHelpRenderer
- Extract TUI/Dialog initialization to TuiFactory/DialogFactory
- Extract signal handling to ConsoleSignalHandler (uses Pcntl module)
- Remove legacy PCNTL fallback code
- Reduce ConsoleApplication from 757 to ~340 lines (55% reduction)

All changes maintain backward compatibility - no breaking changes.
2025-11-09 14:30:59 +01:00
4586f0e9ee feat: further optimize workflows - runtime-base artifact and optional health checks
- Runtime-base job now uses repository artifact instead of cloning (saves 1 git clone per run)
- Health checks are now optional via workflow_dispatch input (default: true)
- Health checks still run automatically on push events
- Reduces additional load on Gitea by ~10-15%
2025-11-09 04:16:00 +01:00
72757954dc feat: optimize workflows with repository artifacts and add performance monitoring
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 33s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 32s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🧊 Warm Docker Build Cache / Refresh Buildx Caches (push) Failing after 11s
📊 Monitor Workflow Performance / Monitor Workflow Performance (push) Failing after 20s
- Use repository artifacts in test and build jobs (reduces 2-3 git clones per run)
- Add comprehensive workflow performance monitoring system
- Add monitoring playbook and Gitea workflow for automated metrics collection
- Add monitoring documentation and scripts

Optimizations:
- Repository artifact caching: changes job uploads repo, test/build jobs download it
- Reduces Gitea load by eliminating redundant git operations
- Faster job starts (artifact download is typically faster than git clone)

Monitoring:
- Script for local workflow metrics collection via Gitea API
- Ansible playbook for server-side system and Gitea metrics
- Automated Gitea workflow that runs every 6 hours
- Tracks workflow durations, system load, Gitea API response times, and more
2025-11-09 04:03:51 +01:00
c3bec296fc fix: replace insecure Traefik API calls with CLI commands
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Has been cancelled
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been cancelled
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been cancelled
🚀 Build & Deploy Image / Build Docker Image (push) Has been cancelled
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been cancelled
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been cancelled
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 33s
System Maintenance / Run Ansible System Maintenance (push) Failing after 15s
Security Vulnerability Scan / Composer Security Audit (push) Failing after 2m18s
- Replace http://localhost:8080/api/http/services with traefik show providers docker
- Replace http://localhost:8080/api/http/routers with traefik show providers docker
- Update debug messages to reference CLI command instead of HTTP API
- Fixes false 'NOT_FOUND' errors since api.insecure: false is set in traefik.yml

The Traefik CLI (traefik show providers docker) works without credentials
and is the recommended method for Traefik v3. It shows all Docker providers
including services, routers, and middlewares, so Gitea will be visible if
registered correctly.
2025-11-09 02:19:27 +01:00
67ab6bd20f fix: ensure PostgreSQL Staging Stack runs before app deployment + fix YAML parsing
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 27s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 1m6s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 28s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 10s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 13s
- Fix YAML parsing error by quoting task name with colon
- Add PostgreSQL Staging Stack check and auto-start for staging deployments
- Ensures postgres-staging-internal network is created by the stack itself
- Network creation remains as fallback if stack doesn't create them
- Improves deployment reliability by ensuring dependencies are available

This addresses the root cause: PostgreSQL Staging Stack should be running
before the application stack tries to use its network.
2025-11-09 01:56:06 +01:00
453e573f28 fix: extract and create external Docker networks from compose files
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 28s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 28s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 11s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 12s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 50s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
- Extract external networks from docker-compose.base.yml and compose override files
- Extract network names from 'name:' fields when external: true
- Create all required external networks before docker compose up
- Fixes error: 'network postgres-staging-internal declared as external, but could not be found'

This ensures all external networks (traefik-public, app-internal, postgres-staging-internal, etc.)
are created before attempting to start containers.
2025-11-09 01:45:35 +01:00
78f6fb186b fix: bind wait/healthcheck tasks to traefik_restart.changed
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 31s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 27s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 13s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 11s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 1m12s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
- fix-gitea-timeouts.yml: Add when conditions to wait_for and uri tasks
  - Wait for Traefik only if traefik_restart.changed
  - Wait for Gitea via Traefik only if traefik_restart or gitea_restart changed

- fix-gitea-complete.yml: Same fixes as fix-gitea-timeouts.yml
  - Wait for Traefik only if traefik_restart.changed
  - Wait for Gitea and service discovery checks only if restart occurred

- fix-gitea-traefik-connection.yml: Fix wait and test tasks
  - Register traefik_restart to track if restart happened
  - Wait for Traefik only if traefik_restart.changed
  - Test Gitea via Traefik only if traefik_restart.changed
  - Update message to reflect actual restart status

- update-gitea-traefik-service.yml: Fix pause block
  - Register traefik_restart to track if restart happened
  - Wait for Traefik only if traefik_restart.changed

This prevents unnecessary blocking when traefik_auto_restart=false and
ensures wait/healthcheck tasks only run when a restart actually occurred.
2025-11-09 01:18:12 +01:00
03affc87cf fix: use shell command for docker pull to get better error messages
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 30s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 23s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 11s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 12s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 11m15s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been cancelled
- Replace docker_image module with shell command for more reliable pulling
- Add detailed error output from pull command (stdout/stderr)
- Show actual docker pull error messages when pull fails
- Simplify pull logic - always attempt pull regardless of local existence
2025-11-09 00:57:08 +01:00
bfcaf09936 fix: improve image pull verification and fix registries_to_login type error
Some checks failed
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 25s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 1m1s
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 27s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 11s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 11s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
- Check if image exists before pull to determine if force pull is needed
- Use docker images command to verify image exists locally (more reliable)
- Fix registries_to_login Jinja2 template to ensure it's always a list
- Add better error messages when image pull fails
- Only tag image if it was successfully verified to exist
2025-11-09 00:51:42 +01:00
6a0b029138 fix: improve Docker image pull error handling and registry login
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 26s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 24s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 11s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 13s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 52s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
- Add debug output for image pull process
- Improve error handling: verify image exists after pull before tagging
- Fix registries_to_login Jinja2 template to handle undefined variables
- Add explicit failure if image pull fails
- Only tag image if it was successfully pulled
2025-11-09 00:45:26 +01:00
51fda6b732 fix: unify Docker registry URLs to localhost:5000
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 27s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 13s
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 4m6s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 27s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Successful in 56s
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 56s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
- Change docker-compose.staging.yml: git.michaelschiemer.de:5000 -> localhost:5000
- Update deploy-image.yml playbook to:
  - Pull images from registry.michaelschiemer.de (source registry)
  - Tag and push to localhost:5000 (local registry) for local containers
  - Remove hardcoded git.michaelschiemer.de:5000 logic
  - Use local_registry from compose files for deployment

This ensures:
- Workflow pushes to registry.michaelschiemer.de (external, HTTPS)
- Containers use localhost:5000 (local, faster, no HTTPS overhead)
- Consistent registry usage across staging and production
2025-11-09 00:29:20 +01:00
bb5284220f fix: remove duplicate changed_when line
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 33s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 1m8s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 29s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 9s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 12s
2025-11-09 00:21:08 +01:00
d192a09823 fix: use registry from docker-compose file for image deployment
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 30s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been cancelled
🚀 Build & Deploy Image / Build Docker Image (push) Has been cancelled
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been cancelled
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been cancelled
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been cancelled
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
Security Vulnerability Scan / Check for Dependency Changes (push) Has been cancelled
The playbook was using docker_registry (registry.michaelschiemer.de) but
docker-compose.staging.yml uses git.michaelschiemer.de:5000. Now the playbook:
- Extracts the actual registry URL from docker-compose files
- Uses that registry for deploy_image
- Updates docker-compose file with the correct registry

This ensures the image is pulled from and deployed to the correct registry.
2025-11-09 00:20:18 +01:00
f33182539f fix: improve registry URL regex to exclude image names with tags
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 26s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 25s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 13s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 12s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 1m8s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
The previous regex matched 'redis:7-alpine' because it saw ':7' as a port.
New regex requires:
- TLD with optional port (e.g. git.michaelschiemer.de:5000)
- Hostname with numeric port only (e.g. localhost:5000)
- localhost with optional port

This excludes image names like 'redis:7-alpine' or 'minio/minio:latest'.
2025-11-09 00:13:33 +01:00
b9437ed68a fix: use immutable list operations in Jinja2 template
Some checks failed
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 22s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 9s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 25s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 59s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 14s
Ansible doesn't allow .append() on lists in Jinja2 templates.
Changed to use select() filter with regex match instead of loop with append.
This is the same filtering logic but using immutable operations.
2025-11-09 00:09:51 +01:00
c8ffb6e298 fix: preserve port numbers in Docker registry URL extraction
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 38s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 14s
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Successful in 14s
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 33s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Failing after 58s
The previous regex was removing port numbers from registry URLs.
Now using sed to only remove the image name part after the slash,
preserving the full registry URL including port (e.g. git.michaelschiemer.de:5000)
2025-11-09 00:05:11 +01:00