Commit Graph
17642 Commits
Author SHA1 Message Date
peaklabs-dev 5d9ea79ac8 refactor(database): move flush into the shared danger zone 2026-10-04 23:07:05 +02:00
peaklabs-dev 1e70c73215 refactor(database): simplify flush command and drop password escaping 2026-10-04 23:07:04 +02:00
peaklabs-dev f5b221e3f3 fix(database): flush KeyDB and TLS Dragonfly and detect failed flushes 2026-10-04 23:07:04 +02:00
Aditya Tripathi dafba128b2 fix(database): fix spacing between flush cache and danger sections
Wrap the flush-cache and danger livewire components in a flex column
container so they're properly spaced on the database danger page.
2026-10-04 22:57:48 +02:00
Aditya Tripathi 4429945da6 refactor(database): move flush cache from action menu to danger page
Relocate the cache flush action out of the Heading dropdown into a
dedicated FlushCache section on the database /danger page, shown only
for Redis, KeyDB and Dragonfly. Keeps the shared Danger component free
of cache-specific branches. Tests updated to target the new component.
2026-10-04 22:57:48 +02:00
Aditya Tripathi e67b27040f test(database): cover Heading::flush workflow; document sudo-parser limitation
Addresses CodeRabbit review on #11513:
- Add Livewire feature tests for Heading::flush() covering success +
  audit event, non-cache guard, denied manage permission, and menu
  visibility for cache vs non-cache databases.
- Document the pre-existing parseCommandsByLineForSudo() limitation that
  mutates passwords containing shell sequences on non-root servers.
2026-10-04 22:57:33 +02:00
Aditya Tripathi 52cad11f34 feat(database): add flush cache option for Redis, KeyDB and Dragonfly
Adds a Flush cache action to the database heading for the three
Redis-protocol cache databases. It runs FLUSHALL ASYNC inside the
running container to clear all keys without stopping the container.

The option is hidden for SQL/Mongo databases and only shown while the
database is running. A confirmation modal requires typing the database
name before flushing. The redis-cli password is shell-escaped to
prevent command injection.
2026-10-04 22:57:27 +02:00
github-actions[bot] 4914d6c760 Merge remote-tracking branch 'origin/main' into next 2026-10-04 19:31:07 +00:00
Andras Bacsai 34e4da1095 fix(ui): copy DNS record values on plain http instances
On non-secure origins the copy button falls back to execCommand('copy')
with a temporary textarea. The textarea was appended to <body>, outside
the x-trap focus trap of the DNS entries modal, so the trap pulled focus
back and the selection was lost before the copy. The button showed
success, but nothing was copied.

Append the textarea next to the button, select it explicitly, and
restore focus afterwards. "Copy all" now uses the shared copyButton
handler instead of its own duplicate fallback that ignored failures.

Closes #12075
2026-10-04 20:36:49 +02:00
Andras Bacsai cfe9e0eee0 fix(settings): load instance backup page without a backup schedule
/settings/backup returned 500 when the coolify-db resource existed without
a scheduled backup. Configure backup now reuses the existing coolify-db and
creates only the missing schedule for the root team, without forcing id 0.

Closes #12074
2026-10-04 20:33:22 +02:00
🏔️ Peak 5f413cd7af chore(deps): add laravel vet an update composer dependencies (#12084) 2026-10-04 20:18:54 +02:00
🏔️ Peak 15ac5b7534 feat(proxy): add hashing options for basic authentication (#12086) 2026-10-04 20:13:16 +02:00
peaklabs-dev 00dced2c24 refactor(api): check HTTP basic auth request fields with one hasAny call 2026-10-04 19:57:48 +02:00
peaklabs-dev 174e0131f7 feat(proxy): add hashing options for HTTP basic authentication 2026-10-04 19:57:48 +02:00
Andras Bacsai 16a8c7999d feat(audit): log account, resource, and instance settings changes
Add audit events for account actions, server and application settings,
services, destinations, storage, backup schedules, and scheduled tasks.
Track changed fields and skip unchanged saves without logging file content.

Add regression coverage for audit events and changed-field detection.
2026-10-04 17:32:50 +02:00
Andras Bacsai f63bf5abaa fix(sentinel): refresh UI on container health and status changes
Include health status in push deduplication and broadcast ServiceChecked after processing complete or partial snapshots.
2026-10-04 16:25:00 +02:00
Andras Bacsai e837a4f0b4 style(ui): use neutral colors for selection checkmarks 2026-10-04 13:46:21 +02:00
Andras Bacsai b235a480b2 fix(service): detect registry-prefixed Grafana server images (#10617) 2026-10-04 13:39:19 +02:00
Andras Bacsai 1b9f0ccaee feat(audit): show encrypted field-level mutation changes (#11788) 2026-10-04 13:15:46 +02:00
Andras Bacsai 9850793109 Merge remote-tracking branch 'origin/main' into pr-11788-encrypted-audit-change-details 2026-10-04 13:13:16 +02:00
Andras Bacsai c4f96a7185 fix(analytics): label zero response status in traffic breakdowns 2026-10-04 12:42:17 +02:00
Andras Bacsai 15b64d6c56 Move proxy TLS certificates to a separate page 2026-10-04 12:35:54 +02:00
Andras Bacsai 51c1a2ad4a fix: add column headers to analytics tables 2026-10-04 12:35:53 +02:00
Andras Bacsai 4c2253c2ad fix(previews): restrict PR loading and status updates to GitHub Apps
Add Application::isGithubAppSource(), which checks that the source is a
GithubApp, and use it in place of is_github_based() for pull request
status updates in ApplicationDeploymentJob and for the "Load pull
requests" action in the previews view.

Previews::load_prs now throws an error for non-GitHub App sources
instead of calling the GitHub API with a GitLab or other source. Also
adds a test checking that GitLab sources don't show or load GitHub pull
requests.
2026-10-04 12:29:48 +02:00
Andras Bacsai 5805a28872 fix(audit): redact raw credential fields and keep hidden fields excluded
Raw commands, URLs and configuration blobs can contain credentials even
when their field names don't look sensitive. Add a list of these fields
to AuditEvent (git_full_url, build/start commands, database confs,
proxy configuration, compose files, environment variables, etc.). Expose
AuditEvent::isSensitiveField() so redaction and audit change capture use
the same check.

Auditable now excludes a model's class-level $hidden fields as well as
its runtime hidden fields. A field stays out of audit changes even after
makeVisible() is called on the instance.

Add regression tests for credentials embedded in raw fields, database
config on create/delete, nested metadata and proxy configuration, and
hidden fields after makeVisible().
2026-10-04 12:26:37 +02:00
Andras Bacsai 4759b7bcf7 fix(audit): redact object values and isolate change preparation failures 2026-10-04 12:26:06 +02:00
Andras Bacsai 83d19800a6 feat(audit): store encrypted field-level changes on mutations
Record old/new values for auditable create, update, and delete actions, persist them encrypted on audit events, expose them in the API, and let the team audit log expand a field-level before/after view. Sensitive, hidden, and identifier fields stay out of the change payload.
2026-10-04 12:26:00 +02:00
Andras Bacsai 9f7697d501 feat(cleanup): purge stale unsubscribed teams (#11668) 2026-10-04 12:13:41 +02:00
Andras Bacsai 66cc64e0d9 fix(sentinel): repair stalled Sentinel and show why pushes fail
- Restart a running Sentinel that has not pushed for 10 minutes, at most
  once per hour. The restart applies the current URL and token.
- Restart an unhealthy Sentinel. Do not restart while its health check
  starts or while its API does not answer yet, which caused restart loops.
- Remember why pushes fail: the reason Coolify rejects a push, and the last
  push error from Sentinel's /api/push-status. Show it on the Sentinel page
  while Sentinel is out of sync.
- When the instance URL or public IP changes, move remote servers that use
  the generated Sentinel URL to the new URL. Custom URLs stay.
2026-10-04 12:03:54 +02:00
Andras Bacsai bf007b9d2d fix(docker): reduce production image size 2026-10-04 09:54:19 +02:00
Andras Bacsai e172beaa30 feat(api): add endpoints to list, get, and open preview deployments
- GET /applications/{uuid}/previews and GET /applications/{uuid}/previews/{pull_request_id}
  return preview deployments (read ability).
- POST /applications/{uuid}/previews opens a preview for a pull request and queues its
  deployment, or redeploys an existing preview (deploy ability). It accepts git_type,
  commit (required for Bitbucket), docker_tag (Docker Image apps), force, and
  instant_deploy. GitHub App and GitLab App sources set git_type automatically.
- Fix POST /deploy with pull_request_id: pass the preview git_type to the deployment, so
  deploy-key and public-repository applications build the pull request instead of the
  base branch.
- Regenerate the OpenAPI spec (also adds the missing service_name logs parameter).
2026-10-04 00:52:17 +02:00
Andras Bacsai c2f63c8f10 fix(server): remove redundant SSH work from server checks
- ServerCheckJob uses the stored reachability state instead of a second SSH
  probe. One failed probe no longer marks the server unreachable without
  UNREACHABLE_THRESHOLD or marks all its resources exited.
- Do not dispatch ServerCheckJob for build servers and Swarm workers.
- Check cloud provider state every 5 minutes instead of every minute.
- ServerPatchCheckJob uses isFunctional() and drops the unused retries.
- Delete the unused ServerCleanupMux job.
- Disable SSH multiplexing per command. The global config change stayed in
  the queue worker, so later jobs (also deployments) ran without mux.
2026-10-04 00:51:58 +02:00
Andras Bacsai 22900b6d12 fix(proxy): stop automatic proxy network reconnects on status checks
Remove the periodic ConnectProxyToNetworksJob dispatch from
PushServerUpdateJob, the synchronous connect in ServerCheckJob when the
proxy is found running, and the connect-on-add in the server
Destinations component. Drop the now-unused
proxy.connect_networks_interval_seconds config option.

Replace the rate-limit/interval tests with a test asserting that no
jobs are pushed when the proxy is running.
2026-10-04 00:36:28 +02:00
Andras Bacsai 9eb666e982 fix(proxy): connect coolify-proxy to destination network before compose up
Add StandaloneDocker::proxyConnectCommand() and run it inline when a
destination is created, replacing the synchronous
ConnectProxyToNetworksJob dispatch. Deployments also run it before
docker compose up, so the proxy is attached to the destination network
even when it was missing.
2026-10-04 00:35:21 +02:00
Andras BacsaiandClaude Opus 5.5 80b8b219a2 fix(queues): run service restarts and proxy start/restart on the deployments queue
- On cloud, RestartService and RestartServiceApplication now run on the
  deployments queue instead of high.
- StartProxy and RestartProxyJob, and the remote processes they start,
  now run on the deployments queue.
- Self-hosted still uses the high queue.
- Tests cover the new routing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 00:11:12 +02:00
Andras Bacsai b081673c98 fix(server): skip Sentinel checks on unreachable servers
- CheckAndStartSentinelJob returns early when the server is not
  functional. It now reads the container state with `docker ps --filter`,
  so an SSH failure throws and is no longer treated as a missing
  container that needs a restart.
- ServerManagerJob only dispatches the Sentinel version check for
  functional servers.
- On cloud, ServerPatchCheckJob runs on the maintenance queue and
  ServerLimitCheckJob runs on the webhooks queue.
- The default number of cloud maintenance workers goes from 10 to 60.
- excludeCertainErrors drops its unused ignore list and is typed as
  `never`.
- Docs and the Horizon config comments are updated, and tests cover the
  new behavior.
2026-10-03 23:39:38 +02:00
peaklabs-dev c298c22f99 chore(deps): upgrade swagger-php to v6 2026-10-03 22:59:20 +02:00
peaklabs-dev d5b3fad6cd chore(deps): upgrade composer dependencies to new major versions 2026-10-03 22:55:28 +02:00
peaklabs-dev a30b0ee721 chore(deps): update composer dependencies 2026-10-03 22:52:26 +02:00
peaklabs-dev 0c7d9af196 chore(deps): add Laravel Vet 2026-10-03 22:51:31 +02:00
peaklabs-dev 9683fd3466 chore(deps): restore composer version ranges 2026-10-03 22:51:07 +02:00
Andras Bacsai 083e71c481 fix(horizon): route webhook jobs to a dedicated cloud webhooks queue
On cloud, GitHub pull request webhooks and Stripe events now run on a
dedicated `webhooks` queue so a busy `high` queue cannot delay them.
Self-hosted instances keep these jobs on `high`.

- Add webhooks_queue() helper and use it in ProcessGithubPullRequestWebhook
  and StripeProcessJob
- Provision a `webhooks` Horizon pool in cloud production, sized by
  HORIZON_WEBHOOKS_PROCESSES (default 10)
- Document the new pool, rollout and rollback steps
- Cover pool provisioning and job queue routing in tests
2026-10-03 21:37:09 +02:00
Andras Bacsai 3575234b38 fix(docker-cleanup): clean after a resource stop only when the disk needs it
A stop or delete no longer queues a full cleanup each time. It skips the
cleanup when one finished on the server in the last hour, and the queued
run only cleans when disk usage is at or above the server cleanup
threshold. The docker_cleanup API flag keeps its default of true.
2026-10-03 21:25:17 +02:00
Andras Bacsai 7956be8833 fix(docker-cleanup): run one bounded cleanup per server on the maintenance queue
Scheduled, manual and stop-triggered cleanups share one per-server lock.
Stop-triggered cleanups wait 60 seconds and are coalesced per server, so
a bulk stop queues one cleanup. Remote commands share a 540 second
deadline below the 600 second job timeout, and application images are
scanned with a fixed number of remote commands.
2026-10-03 21:25:17 +02:00
Andras Bacsai c3b32322eb fix(volume-backups): back off failed container and S3 recovery
Recovery attempts now back off exponentially, stop after 8 attempts, and
mark the execution as needing attention with a failure category. The
scheduler dispatches at most 100 recovery jobs per run, and a pending S3
cleanup no longer blocks new backups. S3 delete errors now raise with
their cause.
2026-10-03 21:25:11 +02:00
Andras Bacsai a3ed963aed fix(server): stagger Sentinel version and patch checks per server
Servers no longer all connect at minute 0. The hourly Sentinel check uses
a per-server minute, and the weekly patch check uses a per-server time on
Sunday between 04:00 and 23:59.
2026-10-03 21:25:00 +02:00
Andras Bacsai edf1ab03a7 fix(scheduler): bound occurrence recovery and fail interrupted claims
- Recover at most 500 open occurrences per scheduler run.
- Mark claims older than the worker timeout as failed.
- Treat long-pending occurrences like lost queued jobs, and do not run
  backups late when they are older than 24 hours.
- Run fixed-time schedules once when daylight saving time repeats an hour.
- Do not run a scheduled task again when Redis hands it out after a killed
  worker, and do not overwrite a finished execution in failed().
2026-10-03 21:25:00 +02:00
Andras Bacsai c681dc0d0e fix(queue): coalesce queued container status and helper cleanup jobs per server
Queued GetContainersStatus runs are unique per server until a worker
starts them, and CleanupHelperContainersJob locks per server instead of
class-wide. Add UniqueUntilProcessingJobDecorator for laravel-actions.
2026-10-03 21:25:00 +02:00
Andras Bacsai e144b990c3 feat(horizon): add fixed-size per-queue worker pools on Coolify Cloud
Cloud production now runs one supervisor per queue (deployments, crons,
high, default, maintenance), so a busy queue cannot starve the others.
Add maintenance_queue() for slow Docker cleanups and a shared
horizon.worker_timeout config value. Self-hosted keeps the s6 supervisor.
2026-10-03 21:24:54 +02:00
Andras Bacsai c6b8dfe367 fix(status): store the status of a database or service right after it starts
After a start, the UI showed "exited" until the regular status check ran.
That check runs on the shared high queue, which can be busy (60 s on Cloud).

The start job (database) and the start task (service, on the deployment
queue) now inspect only the started containers and store their status
before they broadcast. While a health check reports "starting", they
inspect again for up to about 15 s.

ContainerStatusAggregator now builds the per-container status and the
Compose aggregation for both writers, so GetContainersStatus and the
targeted check store the same strings.
2026-10-03 21:16:44 +02:00