Commit Graph
55 Commits
Author SHA1 Message Date
Andras BacsaiandClaude Opus 5.5 1e71561239 fix(backups): sign S3 uploads with the storage region
Closes #12264

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 22:28:48 +02:00
Andras Bacsai 6022073519 fix(notifications): use instance URL in volume backup notification links
Volume backup notifications built links with route(), which uses APP_URL
in queue jobs and gave http://localhost links. Build them from base_url().

Closes #12285
2026-10-23 20:05:23 +02:00
Andras BacsaiandClaude Opus 5.5 65a7bd5c05 chore: merge main into release/v4.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:37:20 +02:00
Andras Bacsai 3b407c8413 fix(backups): send Content-MD5 for S3-only volume backups on Object Lock (#12215) 2026-10-19 21:05:38 +02:00
e3d4411ff2 chore: merge main into release/v4.5 (#12192)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Furox <177975472+Furox-Art@users.noreply.github.com>
Co-authored-by: johandenhollander <johan.den.hollander@finalist.nl>
Co-authored-by: João Cruz <161638790+SrJooJ@users.noreply.github.com>
Co-authored-by: Saim Hashmi <hashmisaim037@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-18 23:43:20 +02:00
Andras BacsaiandClaude Opus 5.5 449d099bd3 fix(backups): accept tar exit code 1 in volume backups
GNU tar exits with 1 when a file changes while it is read. The archive
is still valid, so only exit codes above 1 fail the backup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:41:15 +02:00
Andras Bacsai 12a8fb83fd fix(backups): show exact execution times in backup tables
Closes #11316
2026-10-16 21:05:38 +02:00
Andras Bacsai 0236d32d28 fix(backups): stop mc pipe panic in S3-only volume backups
The mc release in coolify-helper 1.0.17 panics on `mc pipe --quiet`.
Drop the flag and keep the progress bar out of failure messages by
printing only real errors and the last progress frame.

Closes #11995
2026-10-15 23:24:36 +02:00
Andras Bacsai c82cac626f fix(volume-backups): skip containers removed during the stop-during-backup scan
Closes #12167
2026-10-15 22:26:44 +02:00
Andras Bacsai fa1895c99a feat(dashboard): add canvas view with active deployment overlay
Add a /dashboard/canvas page that renders every team server with its
resources and their running or queued deployments, backed by a new
ServerCanvasController::dashboard endpoint and a per-server usage
endpoint for zone headers. The dashboard remembers the list/canvas
choice and each section (projects, servers) its own table/grid view.

- Show Deploying/Queued pills on canvas cards and a foldable recent
  deployments panel; add shared CanvasControls component
- Allow backup downloads from the server host via the S3 download
  storage (PrepareFileDownloadJob accepts a null container)
- Extract backup toggle/run actions into ManagesDatabaseBackup and
  surface them in backup execution headers; merge S3 and retention
  sections into the general backup settings
- Move deployments indicator to the top bar and add a main nav
  resource menu with submenus; simplify breadcrumbs and settings
  layouts
- Add shared variables overview canvas and scheduled task modals
- Add feature tests for dashboard canvas, view modes, navbar
  submenus, backup S3 downloads and scheduled task modals
2026-10-14 23:55:28 +02:00
Andras Bacsai 200af07225 Merge remote-tracking branch 'origin/release/v4.5' into automation/sync-main-to-release-v4.5 2026-10-12 21:38:45 +02:00
Andras Bacsai 065d4825d3 fix(backups): pin S3 endpoint DNS for mc cp uploads
mc --resolve applies per invocation and is not stored in the alias, so
mc cp resolved the S3 host again inside the helper container. On hosts
with split DNS this failed with "no such host", and the upload did not
use the IP validated by SafeWebhookUrl.

Fixes #12129
2026-10-09 08:29:53 +02:00
Andras BacsaiandClaude Opus 5.5 d4d8bba514 docs(backups): add multi-destination S3 planning notes (#11789)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:10:34 +02:00
Andras Bacsai 407c384b09 feat(backups): add configurable missing volume backup alerts
Check enabled volume backup schedules hourly and notify teams when no
execution occurs within the configured number of days. Expose the alert
threshold in the UI and API, with alerts disabled by default.

Route volume backup results and warnings to the appropriate Telegram
backup threads.
2026-10-07 09:37:35 +02:00
Andras Bacsai 58db0eba6f feat(backups): notify teams of volume backup results
Send success and failure notifications through enabled backup channels.
Route successful backups with warnings through failure channels.
2026-10-07 09:24:10 +02:00
Andras Bacsai 439ee6faea fix: restrict proxy content access and scope backup storage to owners
- Hide proxy configuration contents from users without update permission.
- Select and validate backup S3 storage against the resource's team.
- Keep scheduled branch syncs green while a conflict PR remains open.
- Document external mount permissions and Sentinel traffic limits.
- Add regression coverage for authorization and backup storage selection.
2026-10-05 13:20:19 +02:00
Andras Bacsai 4227ec6ebf fix(storage): require deploy permission for external host writes
Require deploy or root token access when creating managed mounts outside
resource directories or changing their file contents through the API.

Synchronize KeyDB and Dragonfly passwords with local and shared
REDIS_PASSWORD values while preserving secret manager resolution.
2026-10-05 12:03:37 +02:00
Andras Bacsai 554bd354bf fix: support host storage paths and clean up cancelled deployments
Allow validated host file and directory mounts outside resource directories
while protecting external paths from deletion.

Clean up cancelled deployment containers and clear tracked process IDs.
Preserve legacy KeyDB and Dragonfly password parsing, accept server backup
paths without extension restrictions, and allow Compose variable proxy ports.
2026-10-05 11:08:52 +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 BacsaiandClaude Opus 5.5 f9d10c22fb fix(backups): stop volume backup recovery retry storms
The scheduler dispatched VolumeBackupRecoveryJob every minute for each
pending execution, and each job retried 20 times with a 60 second backoff.
A stuck execution kept about 20 failing jobs active at a time.

- Run each recovery job once; the scheduler is the only retry path.
- Make the job unique per execution so duplicates do not pile up.
- Dispatch recovery for an execution at most once every 5 minutes.
- Clear the pending flag and record the reason when recovery cannot
  succeed (server, resource, S3 storage, or filename no longer exists),
  so it does not fail forever and block new backups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 09:35:13 +02:00
Andras Bacsai 50be16be8f revert(scheduler): go back to the cron scan and keep the reliability fixes
The missed daily backups on Coolify Cloud came from Redis evicting queue keys
(allkeys-lfu on a full instance), not from the scan of all schedules. The
next_run_at design (452259aac, 5c5740533) did not prevent that, and it added
stored state that must be kept in sync on every frequency, timezone, and server
change. It was not released, so remove it:
- revert next_run_at, its model hooks, the "Next run" UI, and the diagnostics
  changes; restore scheduled_job_states and the queue overlap lock
- a new migration removes the next_run_at columns and creates
  scheduled_job_states again where the removed migration already ran

Keep the changes that fix real problems:
- run the manager every minute from the scheduler with `scheduled:dispatch`,
  so a busy queue cannot delay it past the catch-up window
- load the server chain of scheduled backups with each chunk, which removes
  about 7,000 queries per run on Coolify Cloud
- catch Throwable for each schedule, so one broken schedule does not stop the
  others
- publish database and volume backups again when their queued job was not
  started after 60 minutes (for example, lost in Redis); log lost tasks and
  Docker cleanups as missed. A lost backup is not run again when a newer
  occurrence of the same schedule exists.
2026-10-02 08:05:18 +02:00
Andras Bacsai 452259aacc feat(scheduler): dispatch scheduled jobs by their stored next run time
The scheduled job manager checked every enabled schedule each minute and
evaluated its cron expression in PHP. On Coolify Cloud one run took more than
60 seconds, so runs overlapped and minutes were skipped.

Each schedule now stores its next due time:
- next_run_at on scheduled database backups, scheduled tasks, and volume
  backups, and docker_cleanup_next_run_at on server settings (UTC, indexed)
- model hooks calculate it when a schedule is created or its frequency or
  enabled flag changes; a server timezone change or a move to another server
  calculates it again for the affected schedules

The `scheduled:dispatch` command runs the manager every minute from the
scheduler, not from a queue. It selects only due rows and claims each
occurrence with an atomic update of next_run_at, together with its delivery
record, so parallel runs on several nodes never dispatch it twice.
- database and volume backups run once when they are late; tasks and Docker
  cleanups more than 10 minutes late are logged as missed
- a local time that occurs two times when the clocks go back runs once
- the migration continues each schedule after its last recorded occurrence and
  drops scheduled_job_states

Show the next run, in the server timezone, on the database backup, scheduled
task, volume backup, and Docker cleanup pages, or "Invalid frequency" when the
frequency cannot be calculated. scheduled:diagnostics now lists overdue
schedules and open deliveries.

Remove workarounds that are no longer needed: the queue overlap lock and its
stale-lock repair, the catch-up window, and debug-only logs.
2026-09-29 10:07:23 +02:00
Andras Bacsai 1f4006ac49 test: remove tests that do not exercise app code
Remove tests that copy app logic into the test, grep PHP source as
text, only check literals, constants, class_exists or PHP built-ins,
duplicate other tests, or are always skipped. Keep source checks that
guard security and authorization rules.

Rename a duplicate Pest helper so the full suite loads, drop the
missing v5/Browser path, and remove the CLAUDE.md symlink in favor of
AGENTS.md. Correct AGENTS.md: Dusk is not installed and the upgrade
script is scripts/upgrade.sh.
2026-09-28 11:55:56 +02:00
Andras BacsaiandClaude Opus 5.5 a79ee909c6 chore: remove unused components and markup-only tests
- Delete Blade components, component classes, Livewire components and
  views that nothing uses after the redesign.
- Delete tests that only compare Blade/CSS source text; keep the source
  checks for authorization gates, stable wire:key values and escaping.
- Update stale tests to the current UI and behaviour.
- Update DESIGN.md to the current navigation and layout.
- Add a lesson: test behaviour, not source markup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 00:18:16 +02:00
Andras Bacsai ebfd4d0c1c Merge remote-tracking branch 'origin/main' into pr-11443-next
# Conflicts:
#	app/Actions/Server/StartSentinel.php
#	app/Livewire/Server/Sentinel.php
#	resources/views/livewire/project/shared/storages/all.blade.php
#	resources/views/livewire/project/shared/storages/show.blade.php
2026-09-18 12:00:04 +02:00
Andras Bacsai 8a2457da93 feat(storages): support selective archive deletion for backup schedules
Allow local and S3 archives to be deleted independently when removing a
volume backup schedule, and consolidate destructive-action layouts with a
shared danger-zone component.
2026-09-17 21:20:06 +02:00
Andras Bacsai 09e9822264 Merge remote-tracking branch 'origin/next' into automation/sync-main-to-next
# Conflicts:
#	app/Actions/Database/StartDatabase.php
#	app/Models/StandaloneClickhouse.php
#	app/Models/StandaloneDragonfly.php
#	app/Models/StandaloneKeydb.php
#	app/Models/StandaloneMariadb.php
#	app/Models/StandaloneMongodb.php
#	app/Models/StandaloneMysql.php
#	app/Models/StandalonePostgresql.php
#	app/Models/StandaloneRedis.php
#	resources/views/livewire/project/shared/storages/all.blade.php
#	tests/Feature/PersistentStorageVolumesLayoutTest.php
#	tests/Feature/UserSeederTest.php
2026-09-08 10:02:12 +02:00
Andras Bacsai 6293cd418c feat(backups): stream S3-only volume archives directly (#11642) 2026-09-05 21:10:10 +02:00
Andras Bacsai 2a25e0490e fix(storage): persist S3 settings for new volume backups (#11635) 2026-09-05 15:18:26 +02:00
🏔️ Peak 4ee460cfd0 chore(storage): remove dead storages show component (#11615) 2026-09-03 18:22:18 +02:00
Andras Bacsai e4146a6314 feat(backups): unify service backup management (#11574) 2026-08-31 22:51:30 +02:00
Andras Bacsai eb57a691ca feat(domains): add asynchronous DNS validation
Add queued DNS checks with polling, status indicators, and notifications for application and service domains. Improve volume backup target labels and names.
2026-08-21 21:22:04 +02:00
Andras Bacsai b075693274 fix(backups): preserve existing volume backup timeouts
Change only the default timeout for new volume backups without modifying existing schedules.
2026-08-18 15:30:59 +02:00
Andras Bacsai dd597d1527 fix(backups): support long-running volume backups 2026-08-18 14:10:23 +02:00
Andras Bacsai db1316f878 fix(backups): render form for directory-only targets (#11332) 2026-08-17 17:00:00 +02:00
Andras Bacsai 857375f69c feat(backups): add configurable CPU usage for volume compression
Add server-level compression CPU presets for volume backups and close the private key modal after saving.
2026-08-14 12:00:46 +02:00
Andras Bacsai b3aa1fd232 feat(backups): use parallel gzip for volume backups
Add pigz to the helper image, select it when available with gzip fallback, and log the selected compressor in development.
2026-08-14 00:00:23 +02:00
Andras Bacsai fd5eb3e0cd feat(project): add icons and improve persistent volume management
Add project icon storage and serving with local/S3 support, prevent deletion of compose-managed volumes, and optimize volume backups. Refine project and backup UI components with consistent styling and coverage.
2026-08-13 22:56:52 +02:00
Andras Bacsai 4539d1442e feat(ui): show S3 backup status and move domain action
Eager-load S3 on volume backup lists and add an S3 status column with
Configured/Unavailable/Not set badges. Surface Local vs S3 on the
persistent storages backup column. Move service resource domain links
to a globe action in the card footer, and update related tests and grid CSS.
2026-08-07 12:49:25 +02:00
Andras Bacsai e4fa2b6964 fix(ui): polish mobile layouts, error pages, and volume backups
Keep error pages full-viewport, lift the unsaved bar above the
mobile keyboard, make status/heading layouts stack cleanly on small
screens, route service DB backups to volume-backups, and tighten
volume backup grid/forms. Cover with feature tests.
2026-08-06 21:29:26 +02:00
Andras Bacsai a7a06aa6c8 feat(ui): polish domains, storage, env vars and resource nav
Improve project resource UIs: sort domains by DNS failure, stop re-adding www pairs on refresh, lazy-load storage tabs with counts, tighten env-var tables, keep application tabs active across Livewire polls, unify database type labels, and update related CSS/JS and tests.
2026-08-05 13:50:11 +02:00
Andras BacsaiandShadowArcanist 8ae56587d5 feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)
Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
2026-08-03 23:11:54 +02:00
Andras Bacsai bf72fd5d88 refactor(backups): centralize storage deletion guard 2026-07-19 23:20:46 +02:00
Andras Bacsai 72a0a57f0e fix(backups): enforce authorization and safe retention
- Gate volume backup retention and S3 controls by update permission
- Preserve backup records when S3 deletion fails
- Share SFTP download streaming with consistent missing-file handling
- Handle schedule creation errors and link service database backups
2026-07-19 23:15:55 +02:00
Andras Bacsai 994eee8377 fix(backups): retain volume backups without server 2026-07-19 22:35:33 +02:00
Andras Bacsai 28f8867567 feat(api): add volume backup schedule delete endpoints
Expose DELETE for application, database, and service storage backup
schedules (with OpenAPI docs), reject storage deletes while schedules
exist, skip retention cleanup when no limits are set, and remove S3
archives using the execution’s S3 storage.
2026-07-16 21:44:48 +02:00
Andras Bacsai fab012b5c8 fix(backups): allow volume backup delete without password when 2FA off
Skip empty-password rejection so delete works when two-step confirmation is disabled; cover with a feature test.
2026-07-16 14:43:02 +02:00
Andras Bacsai ac36a59088 fix(backups): pin S3 per volume execution and harden deletes
Store s3_storage_id on scheduled volume backup executions so retention
and recovery use the S3 that received the upload. Extract
DeleteScheduledVolumeBackup for UI and resource deletion, and isolate
database backup retention failures so cleanup errors do not fail the job.
2026-07-16 14:30:58 +02:00
Andras Bacsai 6ae1b4eba2 fix(backups): show setup prompt when no S3 storage is available 2026-07-15 20:36:23 +02:00
Andras Bacsai e0f85de3fe fix(backups): move S3 retention settings to retention page 2026-07-15 20:00:10 +02:00