Commit graph

13952 commits

Author SHA1 Message Date
KM Koushik
aefa426837 Rename unsend to usesend in configuration 2025-12-07 17:32:23 +11:00
Andras Bacsai
8ba7533bdd
Fix Garage service: TOML config and healthcheck (#7510) 2025-12-05 14:47:31 +01:00
Andras Bacsai
84f3481b5e Fix Garage healthcheck: use garage CLI instead of wget
The Garage container doesn't have wget. Use the built-in garage CLI
with 'stats -a' command to check if the node is healthy.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 14:21:39 +01:00
Andras Bacsai
f0fbaf3652
Fix logs not loading for single container services (#7509) 2025-12-05 14:20:25 +01:00
Andras Bacsai
a0884b758f Fix logs not loading for single container services and applications
- Initialize logsLoaded as false to ensure init() triggers log loading
- Set logsLoaded=true after calling getLogs() in init()
- Allow services/PRs to load logs automatically when expandByDefault=true (single container)
- Previously, services would skip initial load unless refresh=true, now single containers work

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 14:19:31 +01:00
Andras Bacsai
5b4567098a Fix Garage TOML config: move RPC settings to root level
Garage v2.x expects rpc_bind_addr, rpc_secret_file, and bootstrap_peers
at the root level of the TOML config, not inside a [rpc] section.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 14:05:18 +01:00
Andras Bacsai
b299ceb445
Add Garage as a one-click service (#7508) 2025-12-05 13:49:03 +01:00
Andras Bacsai
0f54c194d7 Add Garage as a one-click service
Adds support for deploying Garage (S3-compatible object storage) as a
one-click service in Coolify. Includes service template with TOML config,
automatic URL generation for S3, Web, and Admin endpoints with reverse
proxy configuration, and UI fields for credentials and access tokens.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:46:57 +01:00
Andras Bacsai
21429a26b1
Add per-application Docker image retention for rollback (#7504) 2025-12-05 13:00:18 +01:00
Andras Bacsai
62aa7397da Fix grep regex escaping for extended regex (ERE)
Replace preg_quote() with proper ERE escaping since grep -E uses
extended regex syntax, not PHP/PCRE. This ensures special characters
in registry URLs (dots, etc.) are properly escaped.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:57:57 +01:00
Andras Bacsai
511415770a Add server-level toggle to disable application image retention
Adds a new server-level setting that allows administrators to disable
per-application image retention globally for all applications on a server.
When enabled, Docker cleanup will only keep the currently running image
regardless of individual application retention settings.

Changes:
- Add migration for disable_application_image_retention boolean field
- Update ServerSetting model with cast
- Add checkbox in DockerCleanup page (Advanced section)
- Modify CleanupDocker action to check server-level setting
- Update Rollback page to show warning and disable inputs when server
  retention is disabled
- Add helper text noting server-level override capability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:22:20 +01:00
Andras Bacsai
0cc5973901 Disable rollback for non-commit image tags (e.g., 'latest')
Existing Docker Compose deployments may have 'latest' or custom tags
that aren't valid git commit SHAs. When rollback is triggered with these
tags, the deployment fails because the system tries to use the tag as a
git commit reference.

This change:
- Detects if image tag is a valid commit SHA or PR tag
- Disables rollback button for non-commit tags with helpful tooltip
- Displays appropriate label (SHA/PR/Tag) based on tag type
- Guides users to re-deploy to create rollback-enabled images

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:48:42 +01:00
Andras Bacsai
439afca642 Inject commit-based image tags for Docker Compose build services
For Docker Compose applications with build directives, inject commit-based
image tags (uuid_servicename:commit) to enable rollback functionality.
Previously these services always used 'latest' tags, making rollback impossible.

- Only injects tags for services with build: but no explicit image:
- Uses pr-{id} tags for pull request deployments
- Respects user-defined image: fields (preserves user intent)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:41:47 +01:00
Andras Bacsai
710dc3ca4b Add Docker Compose support for image retention during cleanup
Support for Docker Compose applications with build: directives that create
images with uuid_servicename naming pattern (e.g., app-uuid_web:commit).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:17:23 +01:00
Andras Bacsai
b55415f7e6
Fix SSH multiplexing contention for concurrent scheduled tasks (#6736) (#7503) 2025-12-05 11:07:43 +01:00
Andras Bacsai
4ed7a4238a Add per-application Docker image retention for rollback capability
Implement a per-application setting (`docker_images_to_keep`) in `application_settings` table to control how many Docker images are preserved during cleanup. The cleanup process now:

- Respects per-application retention settings (default: 2 images)
- Preserves the N most recent images per application for easy rollback
- Always deletes PR images and keeps the currently running image
- Dynamically excludes application images from general Docker image prune
- Cleans up non-Coolify unused images to prevent disk bloat

Fixes issues where cleanup would delete all images needed for rollback.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:02:07 +01:00
Andras Bacsai
5519247cdd
Add colorized log levels to runtime logs with toggle (#7502) 2025-12-05 10:02:43 +01:00
Andras Bacsai
863fe794a8 Add colorized log levels to runtime logs with toggle
- Add color toggle button (paint brush icon) to runtime logs toolbar
- Color log lines by level: error (red), warning (yellow), debug (purple), info (blue)
- Store color preference in localStorage ('coolify-color-logs')
- Widen Lines input from w-24 to w-32 for better usability
- Remove color features from deployment logs (keeping it cleaner)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 09:55:12 +01:00
Andras Bacsai
ed979f42ef Fix SSH multiplexing contention for concurrent scheduled tasks (#6736)
When multiple scheduled tasks or database backups run concurrently on
the same server, they compete for the same SSH multiplexed connection
socket, causing race conditions and SSH exit code 255 errors.

This fix adds a `disableMultiplexing` parameter to bypass SSH
multiplexing for jobs that may run concurrently:

- Add `disableMultiplexing` param to `generateSshCommand()`
- Add `disableMultiplexing` param to `instant_remote_process()`
- Update `ScheduledTaskJob` to use `disableMultiplexing: true`
- Update `DatabaseBackupJob` to use `disableMultiplexing: true`
- Add debug logging to track execution without multiplexing
- Add unit tests for the new parameter

Each backup and scheduled task now gets an isolated SSH connection,
preventing contention on the shared multiplexed socket.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 09:54:30 +01:00
Andras Bacsai
4f2bb3b50e Add auto-scroll and colorized log levels for deployment logs
- Enable auto-scroll by default when deployment is in progress
- Fix scroll direction to scroll to bottom (where new logs appear)
- Show Follow Logs button outside fullscreen mode
- Add colorized log levels with localStorage toggle:
  - Error (red): error, failed, exception, fatal, panic, critical
  - Warning (yellow): warn, warning, caution
  - Debug (purple): debug, trace, verbose
  - Info (blue): info, notice
- Colors use subtle opacity (10-15%) for readability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 09:39:54 +01:00
Andras Bacsai
558a885fdc
Fix Nixpacks null environment variable parsing error (#7493) 2025-12-04 16:29:56 +01:00
Andras Bacsai
f5ad372def
Add collapsible option to GetLogs component (#7495) 2025-12-04 15:37:48 +01:00
Andras Bacsai
3f96d467bf
Refactor: Move sentinel update checks to ServerManagerJob and add tests for hourly dispatch (#7491) 2025-12-04 15:37:21 +01:00
Andras Bacsai
cbba7f0a67 Add collapsible option to GetLogs component and improve toolbar layout
Added a new `collapsible` property to GetLogs component that allows disabling the expandable header, useful for log viewers in dedicated pages and slide-overs. Applied this to Sentinel logs, Proxy logs, and Coolify Proxy log pages. Also improved the toolbar by moving the lines counter to the left side with an inline prefix label and repositioning the match counter next to it for better organization.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 15:37:14 +01:00
Andras Bacsai
b0f6693fd4
Style PostgreSQL type docs links to match service list (#7494) 2025-12-04 15:33:00 +01:00
Andras Bacsai
ddb7437a63 Style PostgreSQL type docs links to match service list pattern
Replace text "Documentation" links with SVG icons positioned in top-right corner, matching the established design pattern used in the service list. Update all four PostgreSQL type options: PostgreSQL 17, Supabase, PostGIS, and PGVector.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 15:28:52 +01:00
Andras Bacsai
d6bd0941e7 refactor: simplify utility classes in CSS and Blade templates 2025-12-04 15:19:23 +01:00
Andras Bacsai
42f08a99fb Fix Nixpacks null environment variable parsing error
Filter out null and empty environment variables when generating Nixpacks build
configuration to prevent JSON parsing errors. Environment variables with null or
empty values were being passed as `--env KEY=` which created invalid JSON with
null values, causing deployment failures.

This fix ensures only valid non-empty environment variables are included in both
user-defined and auto-generated COOLIFY_* environment variables.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 15:10:39 +01:00
Andras Bacsai
70ff73e954 Merge branch 'next' into macau-v1
Resolved conflicts in ServerManagerJob.php by:
- Keeping sentinel update check code from macau-v1
- Preserving sentinel restart code from next branch
- Ensuring no duplicate code blocks
2025-12-04 15:07:36 +01:00
Andras Bacsai
9e0fa03434
Run proxy restart as background job with real-time logs (#7475) 2025-12-04 14:59:50 +01:00
Andras Bacsai
4002044877 Refactor: Move sentinel update checks to ServerManagerJob and add tests for hourly dispatch 2025-12-04 14:58:18 +01:00
Andras Bacsai
b59bf454b9
Remove webhook maintenance mode replay feature (#7455) 2025-12-04 14:56:38 +01:00
Andras Bacsai
bf9f78538e Remove webhook maintenance directory from Docker configurations 2025-12-04 14:55:07 +01:00
Andras Bacsai
21f3ef6f9f
Fix PostgREST misclassification and empty Domains section (#7442) 2025-12-04 14:53:36 +01:00
Andras Bacsai
18d3be5ef6
fix: move base directory path normalization to frontend (#7437) 2025-12-04 14:52:44 +01:00
Andras Bacsai
05eed974cb
Add log search, download, and collapsible sections (#7484) 2025-12-04 13:55:40 +01:00
Andras Bacsai
8406eb57c5 Fix timestamp toggle in get-logs component
Updated the timestamp rendering condition to check both $timestamp and $showTimeStamps, ensuring the "Toggle Timestamps" button properly controls timestamp visibility in the log viewer.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:51:06 +01:00
Andras Bacsai
1b4de18323 Add DoS prevention to decodeHtml function in get-logs component
Added maximum iteration limit (maxIterations = 3) to the decodeHtml function to prevent potential DoS attacks from deeply nested HTML entities. This matches the implementation in deployment/show.blade.php and ensures the function cannot be exploited for excessive CPU usage.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:46:25 +01:00
Andras Bacsai
554daf4f71
Set deployment status to IN_PROGRESS when queuing builds (#7487) 2025-12-04 13:42:04 +01:00
Andras Bacsai
76afc6841f Set deployment status to IN_PROGRESS when queuing builds
Update the deployment status to IN_PROGRESS immediately when a build is queued, rather than waiting for the job to start. This ensures the UI reflects the correct status without delay.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:41:12 +01:00
Andras Bacsai
bf8dcac88c Move inline styles to global CSS file
Moved .log-highlight styles from Livewire component views to resources/css/app.css for better separation of concerns and reusability. This follows Laravel and Livewire best practices by keeping styles in the appropriate location rather than inline in component views.

Changes:
- Added .log-highlight styles to resources/css/app.css
- Removed inline <style> tags from deployment/show.blade.php
- Removed inline <style> tags from get-logs.blade.php
- Added XSS security test for log viewer
- Applied code formatting with Laravel Pint

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:01 +01:00
Andras Bacsai
2fd34f3d57
Add RustFS one-click service (#7486) 2025-12-04 11:45:08 +01:00
Andras Bacsai
0dfc74ca5a
Update app/Livewire/Project/Application/Deployment/Show.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-04 11:42:39 +01:00
Andras Bacsai
277ebec525 Update RustFS logo to use PNG icon from GitHub
Replace SVG logo with official PNG icon from RustFS GitHub organization.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:42:31 +01:00
Andras Bacsai
6d3e7b7d93 Add RustFS one-click service template
Add RustFS service definition with Docker Compose configuration and SVG logo for Coolify's service marketplace. Includes S3-compatible object storage setup with health checks and configurable environment variables.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:35:21 +01:00
Andras Bacsai
f8146f5a59 Add log search, download, and collapsible sections with lazy loading
Features:
- Add client-side search filtering for runtime and deployment logs
- Add log download functionality (respects search filters)
- Make runtime log sections collapsible by default
- Auto-expand single container and lazy load logs on first expand
- Match deployment and runtime log view heights (40rem)
- Add debug toggle for deployment logs
- Improve scroll behavior with follow logs feature

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 10:57:58 +01:00
Andras Bacsai
2fc870c6eb Fix ineffective restartInitiated guard with proper debouncing
The guard was setting and immediately resetting the flag in the same
synchronous execution, providing no actual protection. Now the flag
stays true until proxy reaches a stable state (running/exited/error)
via WebSocket notification, with additional client-side guard.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 08:57:03 +01:00
Andras Bacsai
46384170aa
Fix: Service status stuck at starting after stop (#7479) 2025-12-04 08:27:42 +01:00
Andras Bacsai
c53988e91d Fix: Cancel in-progress deployments when stopping service
When stopping a service that's currently deploying, mark any IN_PROGRESS or QUEUED activities as CANCELLED. This prevents the status from remaining stuck at "starting" after containers are stopped.

Follows the existing pattern used in forceDeploy().
2025-12-04 08:23:32 +01:00
Andras Bacsai
c464c67cba
Fix: Pass backup timeout to remote SSH process (#7476) 2025-12-03 20:10:18 +01:00