Commit Graph

14259 Commits

Author SHA1 Message Date
Andras Bacsai cf4985c596 refactor: Optimize UUID generation for cloud provider tokens using chunked processing 2025-12-11 12:08:12 +01:00
Andras Bacsai 1b4705220d refactor: Replace debounced search method with x-model.debounce for improved performance 2025-12-11 12:01:57 +01:00
Andras Bacsai a5331db179 Fix: Correctly set session for team before creating user token 2025-12-11 11:59:59 +01:00
Andras Bacsai 700550b26f Fix: Concurrent builds ignored & add deployment queue limit (#7488) 2025-12-11 11:03:02 +01:00
Andras Bacsai d019553809 Add Retry-After header to 429 rate limit responses
Adds Retry-After: 60 header to all deployment queue full responses,
helping webhook clients know when to retry their requests.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 11:02:29 +01:00
Andras Bacsai 4afc58cb53 perf: Remove dead server filtering code from Kernel scheduler (#7585) 2025-12-11 10:55:21 +01:00
Andras Bacsai 3962f1a5b9 perf: Remove dead server filtering code from Kernel scheduler
Remove unused server filtering logic in Kernel.php that was querying servers
but never using the results. Simplify Sentinel update checks in ServerManagerJob
by reusing the $isSentinelEnabled variable and removing unnecessary timezone
parameter for hourly cron execution.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 10:33:55 +01:00
Andras Bacsai 07153de68d Fix deployment marked as failed after healthy container rolling update (#7583) 2025-12-11 10:01:00 +01:00
Andras Bacsai 5b20b49f53 feat: Add deterministic UUIDs to dev seeders (#7584) 2025-12-11 09:58:33 +01:00
Andras Bacsai 2f721c6166 feat: Add deterministic UUIDs to development seeders
Add fixed UUIDs to all development seeders for programmatic API access:
- Server: localhost
- Project: project
- Applications: docker-compose, nodejs, dockerfile, dockerfile-pure
- StandaloneDocker: docker
- StandalonePostgresql: postgresql
- S3Storage: minio
- PrivateKeys: ssh, github-key
- GithubApps: github-public, github-app
- GitlabApp: gitlab-public
- LocalPersistentVolume: volume

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:54:27 +01:00
Andras Bacsai a2e5b2d67d Fix deployment marked as failed when healthy container completes rolling update
Prevent deployment status from regressing to FAILED after it's marked as FINISHED by:
1. Calling completeDeployment() first in post_deployment() before any operations that could fail
2. Wrapping all post-deployment side effects in try-catch blocks
3. Adding FINISHED to terminal states that cannot be changed
4. Protecting ExecuteRemoteCommand from overwriting FINISHED status

This fixes the issue where a deployment with a healthy container and successful rolling update was still marked as Failed in the UI.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:42:02 +01:00
Andras Bacsai 18675c8a4d Fix restart counter persistence and add crash loop example (#7582) 2025-12-11 09:40:56 +01:00
Andras Bacsai 9598562ca0 Fix deployment logs overlap with indicator (#7580) 2025-12-11 09:40:39 +01:00
Andras Bacsai c6a89087c5 Refactor deployment indicator to use server-side route detection
Replace client-side JavaScript URL checking with Laravel's routeIs() for determining when to reduce indicator opacity. This simplifies the code and uses route names as the source of truth.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:39:56 +01:00
Andras Bacsai 01308dede5 Fix restart counter persistence and add crash loop example
- Move restart counter reset from Livewire to ApplicationDeploymentJob to prevent race conditions with GetContainersStatus
- Remove artificial restart_type=manual tracking (never used in codebase)
- Add Crash Loop Example in seeder for testing restart tracking UI

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:39:55 +01:00
Andras Bacsai 918dc788ce Remove duplicate getArchDockerInstallCommand() method (#7581) 2025-12-11 09:31:43 +01:00
Andras Bacsai ac48c656ba Fix deployment follow logs stopping mid-deployment (#7579) 2025-12-11 09:26:19 +01:00
Andras Bacsai 206a9c03d2 Remove duplicate getArchDockerInstallCommand() method
The method was defined twice with the first (outdated) definition using
-Syyy and lacking proper flags. Keep the improved version that uses -Syu
with --needed for idempotency and proper systemctl ordering.
2025-12-11 09:25:35 +01:00
Andras Bacsai 56102f6321 Prevent multiple deploymentFinished event dispatches
Add flag to ensure event is only dispatched once, avoiding wasteful
duplicate dispatches during the race condition window before Livewire
removes wire:poll from the DOM.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:25:22 +01:00
Andras Bacsai 911cfa0b38 Fix deployment logs overlap with indicator and improve visibility
- Reduce deployment logs max-height from 40rem to 30rem to prevent overlap with deployments indicator
- Add conditional opacity (60%) to deployments indicator on deployment pages only (100% on other pages)
- Indicator becomes fully visible on hover or when expanded

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:24:15 +01:00
Andras Bacsai d9762e0310 Fix deployment log follow feature stopping mid-deployment
Removed auto-disable behaviors that caused follow logs to stop unexpectedly:
- Removed scroll detection that disabled following when user scrolled >50px from bottom
- Removed fullscreen exit handler that disabled following
- Removed ServiceChecked event listener that caused unnecessary flickers

Follow logs now only stops when:
- User explicitly clicks the Follow Logs button
- Deployment finishes (auto-scrolls to end first, then disables after 500ms delay)

Also improved get-logs component with memory optimizations:
- Limited display to last 2000 lines to prevent memory exhaustion
- Added debounced search (300ms) and scroll handling (150ms)
- Optimized DOM rendering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 09:14:27 +01:00
Andras Bacsai 0e6a2fc15d Fix Docker container race condition during upgrades (#7565) 2025-12-10 14:19:09 +01:00
Andras Bacsai 65a83fe050 Fix Docker container race condition during upgrades
Add --project-name coolify to docker compose commands to ensure consistent
container naming when executed inside helper containers. Remove --force-recreate
to only recreate containers when image or configuration changes, reducing
race condition risk during concurrent upgrades.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 14:14:43 +01:00
Andras Bacsai 0f9344bdc2 Fix empty logs display and fullscreen coverage (#7564) 2025-12-10 14:05:54 +01:00
Andras Bacsai 37b71cfda3 Fix empty logs display and fullscreen coverage in logs viewer
- Change empty state message from "Refresh to get the logs..." to "No logs yet." with proper styling
- Auto-fetch logs when expanding containers by passing refresh=true to getLogs()
- Ensure fullscreen mode covers entire viewport with solid background by overriding x-collapse styles

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 14:04:10 +01:00
Andras Bacsai 4fca2d457b feat: add Hetzner server provisioning API endpoints (#7562) 2025-12-10 13:52:41 +01:00
Andras Bacsai 9a671d0d8f feat: add UUID column to cloud_provider_tokens and populate existing records 2025-12-10 13:52:04 +01:00
Andras Bacsai 56394ba093 fix: return actual error message from token validation endpoint
- Return the specific error from validateProviderToken() instead of
  generic "Failed to validate token." message
- Update test to expect the actual error message

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 13:22:53 +01:00
Andras Bacsai d68ee93445 Update garage.yaml for improved configuration clarity 2025-12-10 12:57:34 +01:00
Andras Bacsai 596b1cb76e refactor: extract token validation into reusable method
- Add validateProviderToken() helper method to reduce code duplication
- Use request body only ($request->json()->all()) to avoid route parameter conflicts
- Add proper logging for token validation failures
- Add missing DB import to migration file
- Minor test formatting fix

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 12:56:57 +01:00
Andras Bacsai 426a6334c7 Remove provisional Hetzner API documentation
These documentation files were created during development but should not be committed at this stage. The API implementation is complete and tested, but the documentation will be provided separately through official channels.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 12:43:38 +01:00
Andras Bacsai 10003cec3d fix: add UUID support to CloudProviderToken model
- Add uuid column to cloud_provider_tokens table via migration
- Update CloudProviderToken to extend BaseModel for auto UUID generation
- Generate UUIDs for existing records in migration
- Fixes null uuid issue in API responses

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 08:59:13 +01:00
Andras Bacsai ef0a1241b0 fix: rename validate() to validateToken() to avoid parent method conflict
The validate() method conflicted with Controller::validate(). Renamed to
validateToken() to resolve the declaration compatibility issue.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 08:57:04 +01:00
Andras Bacsai 62c394d3a1 feat: add Hetzner server provisioning API endpoints
Add complete API support for Hetzner server provisioning, matching UI functionality:

Cloud Provider Token Management:
- POST /api/v1/cloud-tokens - Create and validate tokens
- GET /api/v1/cloud-tokens - List all tokens
- GET /api/v1/cloud-tokens/{uuid} - Get specific token
- PATCH /api/v1/cloud-tokens/{uuid} - Update token name
- DELETE /api/v1/cloud-tokens/{uuid} - Delete token
- POST /api/v1/cloud-tokens/{uuid}/validate - Validate token

Hetzner Resource Discovery:
- GET /api/v1/hetzner/locations - List datacenters
- GET /api/v1/hetzner/server-types - List server types
- GET /api/v1/hetzner/images - List OS images
- GET /api/v1/hetzner/ssh-keys - List SSH keys

Server Provisioning:
- POST /api/v1/servers/hetzner - Create server with full options

Features:
- Token validation against provider APIs before storage
- Smart SSH key management with MD5 fingerprint deduplication
- IPv4/IPv6 network configuration with preference logic
- Cloud-init script support with YAML validation
- Team-based isolation and security
- Comprehensive test coverage (40+ test cases)
- Complete documentation with curl examples and Yaak collection

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 08:38:09 +01:00
Andras Bacsai d2a1b96598 Bump version to 4.0.0-beta.454 (#7545) 2025-12-10 08:27:22 +01:00
Andras Bacsai 6e15d8e5f8 Add ValidProxyConfigFilename rule for dynamic proxy config validation (#7544) 2025-12-09 16:32:41 +01:00
Andras Bacsai 7c552e8a6a Fix API response to return fqdn instead of non-existent domains attribute (#7546) 2025-12-09 16:29:02 +01:00
Andras Bacsai 32e047e512 Fix API response to return fqdn instead of non-existent domains attribute
The Application model stores domain as 'fqdn' not 'domains'. The API response
was incorrectly using data_get($application, 'domains') which always returned
null. Fixed all 5 application creation endpoint responses.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 16:26:08 +01:00
Andras Bacsai 5ec3f39b9b Add autogenerate_domain API parameter for applications (#7515) 2025-12-09 16:19:49 +01:00
Andras Bacsai 25e295e627 Bump version to 4.0.0-beta.454 2025-12-09 16:15:55 +01:00
Andras Bacsai 028fb5c22c Add ValidProxyConfigFilename rule for dynamic proxy config validation
Adds a new Laravel validation rule to prevent path traversal, hidden files, and invalid filenames in the dynamic proxy configuration feature. Validates filenames to ensure they contain only safe characters, don't exceed filesystem limits, and don't use reserved names.

- New Rule: ValidProxyConfigFilename with comprehensive validation
- Updated: NewDynamicConfiguration to use the new rule
- Added: 13 unit tests covering all validation scenarios

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 16:12:45 +01:00
Murat Aslan d2e2ca892c fix: add soju-run volume for admin socket
- Add soju-run volume for /run/soju directory
- Re-add unix+admin listener for sojuctl user management
- Tested: user creation works with sojuctl
2025-12-09 00:35:53 +03:00
Murat Aslan 139db09fe0 fix: correct soju config path and simplify template
- Fix config path to /soju-config (not /etc/soju/config)
- Remove unix+admin listener (causes bind error)
- Remove health checks (nc/wget not available in containers)
- Simplify depends_on configuration

Tested locally with docker compose - both services start successfully
2025-12-09 00:28:33 +03:00
Murat Aslan d6c5265556 fix: update soju config path and add WebSocket support
- Fix config path to /etc/soju/config
- Use explicit host:port bindings
- Switch to WebSocket listener for Gamja compatibility
- Add GAMJA_SERVER environment variable
2025-12-09 00:16:20 +03:00
Andras Bacsai b7282ad565 v4.0.0-beta.453 (#7467) 2025-12-08 21:22:52 +01:00
Andras Bacsai b3289aff71 fix: Prevent terminal disconnects when browser tab loses focus (#7538) 2025-12-08 20:48:53 +01:00
Andras Bacsai dca6d9f7aa fix: Prevent terminal disconnects when browser tab loses focus
Add visibility API handling to pause heartbeat monitoring when the browser tab is hidden, preventing false disconnection timeouts. When the tab becomes visible again, verify the connection is still alive or attempt reconnection.

Also remove the ApplicationStatusChanged event listener that was triggering terminal reloads whenever any application status changed across the team.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 20:48:03 +01:00
Andras Bacsai e1d5da3622 fix: Add comprehensive PR cleanup to GitLab, Bitbucket, and Gitea (#7537) 2025-12-08 20:12:33 +01:00
Andras Bacsai ebac90097a fix: Escape container name in orphaned PR cleanup job
Add shell escaping with escapeshellarg() for container names in the
docker rm command to prevent command injection. Also add validation
to skip containers with missing names and log a warning.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 20:09:00 +01:00
Andras Bacsai 86a02a12e6 Update app/Actions/Application/CleanupPreviewDeployment.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-08 17:35:13 +01:00