Commit Graph

4949 Commits

Author SHA1 Message Date
Andras Bacsai
43178e6033 fix: Address PR review feedback for coolify.json feature
Critical fixes:
- Fix team_id access: use $this->team_id instead of $this->team()->id
- Fix environment_variables query for preview vars: use correct relationship
- Fix autogenerate_domain dropped from API allowedFields array
- Use $request->boolean() for use_coolify_json parameter

Major fixes:
- Add checkCoolifyConfig conditional to GithubPrivateRepository
- Add checkCoolifyConfig conditional to GithubPrivateRepositoryDeployKey
- Update knownFields to include all valid top-level config fields

Minor fixes:
- Fix schema examples: magic variables don't use $ prefix

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 19:20:38 +01:00
Andras Bacsai
dd410ecef9 feat: Add beta labels and secure env var export for coolify.json
- Add beta labels/badges to all coolify.json UI touchpoints:
  - Menu option in Select.php shows "(Beta)" suffix
  - Visual badge on resource card in select.blade.php
  - Warning callout on import page
  - Badge on download button in General tab

- Export env vars with placeholder values (${VAR_NAME}) instead of
  actual secrets for security - users must fill in values when importing

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 19:20:38 +01:00
Andras Bacsai
b321abbe2e refactor: Remove unnecessary logging from various jobs and views 2025-12-27 19:20:38 +01:00
Andras Bacsai
b66988943b refactor: Remove logging for active deployments and orphaned container removals in CleanupHelperContainersJob 2025-12-27 19:20:38 +01:00
Andras Bacsai
d5a5d1c32a feat: Add support for coolify.json configuration import and schema validation
- Introduced a new schema for coolify.json to validate application configurations.
- Implemented loading and parsing logic for coolify.json in the application.
- Added UI components for importing coolify.json configurations in various project creation flows.
- Enhanced logging for coolify.json processing to aid in debugging.
- Created unit tests to validate coolify.json parsing and magic variable resolution.
- Updated existing forms to include options for importing coolify.json settings.
2025-12-27 19:20:38 +01:00
Andras Bacsai
083d745d70
fix(restart): reset restart count when resource is manually stopped (#7784)
Some checks are pending
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Waiting to run
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Staging Build / merge-manifest (push) Blocked by required conditions
2025-12-27 15:22:26 +01:00
Andras Bacsai
75d8ebe803 fix(restart): reset restart count when resource is manually stopped
When a database or application was in a restart loop, the restart count
persisted even after the user manually stopped the resource. This caused
the UI to continue showing "(Xx restarts)" after user intervention.

Now resets restart_count, last_restart_at, and last_restart_type when:
- User stops a database (StopDatabase action)
- User stops an application (StopApplication action)

The existing reset in GetContainersStatus is still needed for containers
that exit on their own (crash without recovery, Docker giving up).

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-27 15:21:19 +01:00
Andras Bacsai
367d7eeabc fix(proxy): defer UI refresh until Traefik version check completes
Fixes #7732 - The proxy status change listener was dispatching ProxyStatusChangedUI
before the Traefik version check job had a chance to run. This caused users to see
stale version information when they refreshed the page immediately after restarting
the proxy.

The fix defers the UI refresh when a Traefik version check is being dispatched. The
version check job already dispatches its own ProxyStatusChangedUI event when
complete, ensuring the UI refreshes with updated version data.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-27 15:16:58 +01:00
Andras Bacsai
ef1abe17b8 refactor(redirect): replace redirect calls with redirectRoute helper for consistency
Some checks failed
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Has been cancelled
Staging Build / merge-manifest (push) Has been cancelled
2025-12-26 13:29:59 +01:00
Andras Bacsai
5d98847e49 feat(redirect): add redirectRoute helper for SPA navigation support 2025-12-26 13:29:59 +01:00
Andras Bacsai
41b3c71d02 fix(terminal): add sudo for non-root users to access Docker socket in terminal command 2025-12-26 11:49:02 +01:00
Andras Bacsai
9a1020d5be fix(database): replace temporary file handling with base64 encoding for Keydb and Redis configuration
Some checks are pending
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Waiting to run
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Staging Build / merge-manifest (push) Blocked by required conditions
2025-12-25 18:17:42 +01:00
Andras Bacsai
f995426fb3 fix(sentinel): Add missing instantSave method and prevent duplicate notifications
- Add public instantSave() method to handle instant saves from checkbox clicks
- Remove redundant updatedIsMetricsEnabled() and updatedIsSentinelDebugEnabled() hooks
- These hooks were causing duplicate notifications when checkboxes were toggled

The instantSave attribute on checkboxes triggers wire:click='instantSave', which was failing
because the method didn't exist. Now it saves settings and restarts Sentinel in one action,
preventing the duplicate updates from both wire:click and wire:model events.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-23 15:34:09 +01:00
Andras Bacsai
f77a2674fc
feat: Add manual Stripe subscription sync command (#7706)
Some checks failed
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Has been cancelled
Staging Build / merge-manifest (push) Has been cancelled
2025-12-19 09:35:52 +01:00
Andras Bacsai
e6ed3130b5 feat(stripe): Add manual subscription sync command with dry-run support
Add cloud:sync-stripe-subscriptions command to manually check all
subscriptions against Stripe. By default it only reports discrepancies
without making changes. Use --fix flag to actually apply corrections.

This addresses race conditions where subscriptions can be cancelled in
Stripe but remain marked as active in Coolify's database.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-19 09:34:39 +01:00
Andras Bacsai
c6c9d5a591 fix(deployment): Skip docker rm -f for builder containers with --rm flag
Builder containers are started with the --rm flag, which automatically removes them when stopped. The explicit docker rm -f is redundant and adds unnecessary steps to deployment logs.

This change adds a skipRemove parameter to graceful_shutdown_container() and sets it to true for builder container shutdowns (uuid-based) while keeping the default behavior for application containers.

Fixes #7566

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 19:36:54 +01:00
Andras Bacsai
21ce75e4d4
Revert "fix(deployment): Remove redundant docker rm when using --rm flag" 2025-12-18 13:20:59 +01:00
Andras Bacsai
922c0a9e7c
Fix deployment logs flickering and HTML entity encoding (#7689) 2025-12-18 12:53:02 +01:00
Andras Bacsai
d28e7f7f8a
fix(deployment): Remove redundant docker rm when using --rm flag (#7688) 2025-12-18 12:31:21 +01:00
Andras Bacsai
6379123f93 fix(deployment): Remove redundant docker rm when using --rm flag
Helper containers are started with --rm flag which automatically removes the container when it stops. Removed redundant docker rm commands from graceful_shutdown_container in ApplicationDeploymentJob and replaced docker rm with docker stop in DatabaseBackupJob.

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 12:30:34 +01:00
Andras Bacsai
9493398b58 Fix deployment logs flickering and HTML entity encoding
- Remove per-line x-effect directives that re-evaluated for every log line during polling
- Replace with efficient applySearch() function that updates logs once after Livewire morph
- Remove unnecessary caching mechanisms (renderTrigger, decodeCache, matchCountCache)
- Remove double HTML encoding of log lines (e() + Blade escaping)
- Add decodeHtml() helper to properly decode HTML entities from data attributes
- Use morph.updated hook instead of commit hook for efficient DOM updates

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 12:30:26 +01:00
Andras Bacsai
9675d74360 refactor: move Swarm and Sentinel to dedicated sidebar menu items
- Create new Server/Swarm.php Livewire component and view for Swarm configuration
- Create new Server/Sentinel.php Livewire component and view for Sentinel settings
- Add server.swarm and server.sentinel routes
- Move Swarm and Sentinel sections from General page to sidebar menu items
- Improve organization by separating concerns into dedicated pages

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-18 12:18:22 +01:00
Andras Bacsai
27f2e32fbf
Improve logging view performance to prevent browser freezing (#7682) 2025-12-18 08:50:04 +01:00
Andras Bacsai
acd7106f93 Refactor log view to eliminate flickering during refresh
- Use atomic update pattern in backend: collect logs into temp variable
  before replacing outputs (prevents empty state flash)
- Remove per-line x-effect directives that caused 4000+ reactive
  evaluations on every update
- Replace inline Alpine.js class bindings with CSS utility classes
- Use single $watch and morph.updated hook instead of renderTrigger
- Remove HTML entity decode cache (no longer needed)
- Fix search highlight padding that caused text shifting

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 08:46:39 +01:00
Andras Bacsai
582bdc3739 test: Add comprehensive preview deployment port and path tests
Add missing edge case test for root path (/) and expand test coverage
for preview FQDN generation. Tests verify that ports and paths are
correctly preserved in preview URLs while excluding root paths.

Fixes #2184
2025-12-17 21:35:54 +01:00
Andras Bacsai
7f29a46186
feat: Add copy logs button to deployment and runtime logs (#7676) 2025-12-17 20:57:44 +01:00
Andras Bacsai
6f2a33f859 feat: Add copy logs button to deployment and runtime logs
Add copy-to-clipboard functionality for both deployment logs and runtime container logs with success notification. Fixed event dispatch to use Livewire.dispatch() for proper toast notification handling. Reorganized copy and download buttons to appear consecutively in runtime logs toolbar.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-17 20:54:22 +01:00
Andras Bacsai
4b65b02103 Fix server resources tab 500 error with mixed model types
The Resources tab threw a "Queueing collections with multiple model types is not supported" error because the Livewire component was storing a mixed-type Eloquent collection (Applications, Databases, Services) as a public property, causing Livewire's serialization to fail.

Fixed by: storing only the unmanaged containers array in the component, and calling definedResources() directly in the Blade view for the managed tab.

Fixes #7666

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-17 18:13:55 +01:00
Andras Bacsai
1b3be5bef6
Fix database status flickering and add restart tracking (#7665) 2025-12-17 17:48:15 +01:00
Andras Bacsai
d04d0ab499 Refactor restart tracking and add missing model casts
- Consolidate duplicate restart tracking logic in GetContainersStatus
- Add last_restart_type string cast to all 8 standalone database models

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 17:45:58 +01:00
Andras Bacsai
6d47d24169 Fix standalone database "restarting" status flickering and add restart tracking
- Fix status flickering: Track databases in active/transient states (restarting, starting, created, paused) not just running
- Add isActiveOrTransient() helper to distinguish between active states and terminal states (exited, dead)
- Add safeguard: Protect updateNotFoundDatabaseStatus() from marking as exited when containers collection is empty
- Add restart_count tracking: New migration adds restart_count, last_restart_at, last_restart_type to all standalone database tables
- Update 8 database models with $casts for new restart tracking fields
- Update GetContainersStatus to extract RestartCount from Docker and update database models
- Reset restart tracking when database exits completely

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-17 16:25:41 +01:00
Andras Bacsai
96f2e81191
feat: copy resource logs with PII/secret sanitization (#7648)
Some checks are pending
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Waiting to run
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Staging Build / merge-manifest (push) Blocked by required conditions
2025-12-17 16:05:13 +01:00
Andras Bacsai
679833a0a6 Fix PostgreSQL version selection in global search redirect
Allow users to select PostgreSQL version instead of automatically creating postgres:16-alpine when using global search. The fix includes:

- Remove hardcoded database_image parameter from GlobalSearch
- Update Create.php to fall through to Select component when database_image is not provided
- Add type and destination to Select component query string with proper URL mapping
- Jump directly to PostgreSQL version selection step when navigating from global search

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-17 16:01:39 +01:00
Andras Bacsai
20c6f61858
Add toggleable wire:navigate SPA navigation with prefetching (#7661) 2025-12-17 14:27:19 +01:00
Andras Bacsai
e709e2c131 Add toggleable wire:navigate SPA navigation with prefetching
Implement instance-wide SPA navigation toggle that enables smooth page transitions with prefetching on hover. Excludes terminal links which require full page lifecycle for WebSocket connections. Adds defensive checks to global-search component for SPA navigation compatibility.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-17 12:09:13 +01:00
Andras Bacsai
d4a403278d
Added ClickHouse Migration Support (#7392) 2025-12-17 11:37:53 +01:00
Andras Bacsai
df0ad44500 Widen upgrade popup and add dev mode simulation
- Set modal width to consistent 48rem for both upgrade states
- Remove max-width constraint from progress stepper
- Add dev mode with Simulate button for local testing
- Simulate cycles through all upgrade steps with 2-second delays
2025-12-17 10:59:38 +01:00
Andras Bacsai
f763c3aa8b Refactor project environment and resource management UI
- Removed unnecessary SVG icons from the environment edit view for cleaner UI.
- Deleted the environment select component as it was no longer needed.
- Enhanced the project resource index view with a dropdown for environments and resources, improving navigation.
- Implemented dynamic dropdowns for environments and their associated resources, allowing for better user interaction.
- Added transitions and hover effects for a more responsive design.
- Updated the layout to ensure a consistent user experience across different project resources.
2025-12-16 12:30:53 +01:00
Andras Bacsai
2646fb81eb
Optimize PushServerUpdateJob with batch updates and async jobs (#7639) 2025-12-16 12:22:24 +01:00
Duane Adam
b0b3098abe
Merge branch 'next' into feat/copy-resource-logs-with-sanitization 2025-12-16 12:03:53 +08:00
Duane Adam
327e8181af
Add copy logs button with PII/secret sanitization
Add a copy button to individual container logs that strips sensitive
data before copying to clipboard. Includes sanitization for emails,
database URLs with passwords, JWT tokens, API keys, private key blocks,
and git access tokens.
2025-12-16 11:49:40 +08:00
Andras Bacsai
eefc97fccc
feat: prioritize main/master branch selection (#7520) 2025-12-15 15:47:57 +01:00
Andras Bacsai
0efa4af5c3 Optimize PushServerUpdateJob performance with batch updates and async jobs
- Eager load service applications and databases to eliminate N+1 queries
- Replace individual model updates with batch database updates for applications, previews, and services
- Move connectProxyToNetworks to async ConnectProxyToNetworksJob to avoid blocking status updates
- Optimize Server.databases() and applications() methods with efficient database queries
- Use flatMap for cleaner collection transformations

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-15 14:06:32 +01:00
Andras Bacsai
5e90fc6b8f Fix S3 credential whitespace issue with proper trimming
- Add model saving event to trim key/secret fields (encrypted casts)
- Add attribute mutators to trim endpoint, bucket, region fields
- Create migration to fix existing S3 storage records with whitespace
- Use chunking in migration to handle large datasets efficiently
- Verify re-encryption validity before committing changes

Fixes #7469 #7594

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-15 12:05:54 +01:00
Andras Bacsai
36d7844989 Fix deployment log view UX issues
- Prevent text selection from being cleared when logs are re-rendered during polling
- Preserve fullscreen state when toggling debug logs or other Livewire updates
- Fix log filtering to properly apply when debug mode is toggled

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-15 10:47:03 +01:00
Andras Bacsai
2a21b18998
Improve upgrade process UX with better progress visibility (#7609)
Some checks are pending
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Waiting to run
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Staging Build / merge-manifest (push) Blocked by required conditions
2025-12-13 22:37:37 +01:00
Andras Bacsai
918959b7f5 Remove unused ChangelogService import from Upgrade component 2025-12-13 22:26:31 +01:00
Andras Bacsai
20a9855c04 Address CodeRabbit review feedback
- Fix null-safe operator on currentTeam() call in Upgrade.php
- Add --rm flag to docker run in upgrade.sh for cleanup consistency
- Store beforeunload handler as named reference and clean up on success
- Add clarifying comments for upgrade method calls
- Add error state handling with close option in upgrade modal
- Add step mapping documentation comment in upgrade-progress component

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 21:42:19 +01:00
Andras Bacsai
dc12cbc6a0 Remove changelog loading logic from upgrade component 2025-12-13 21:14:00 +01:00
Andras Bacsai
deb9a7dab0 Refactor upgrade status to use Livewire instead of API endpoint
- Remove /api/upgrade-status endpoint and route
- Add getUpgradeStatus() method to Upgrade Livewire component
- Update frontend to call Livewire method via $wire.getUpgradeStatus()
- Simpler approach: no separate API, auth handled by Livewire

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 21:37:32 +01:00