Changes

Database services inside Docker Compose applications had no way to configure scheduled backups. Service-type deployments had this through ServiceDatabase, but Application buildpack deployments were left out — the service_id FK had no Application equivalent.

Changes:

  • Migration makes service_id nullable and adds application_id FK so ServiceDatabase supports both parent types (XOR CHECK constraint on PostgreSQL)
  • parseDockerComposeFile() creates ServiceDatabase rows linked to the application for detected database images
  • Orphan cleanup: database services removed from the compose file on re-parse have their rows and scheduled backup records deleted
  • DatabaseBackupJob re-queues after 5 minutes when the parent application is actively deploying
  • New Livewire page and route expose the scheduled-backup UI for compose-app databases
  • General settings page lists each database service with a Backups link

Issues

  • Fixes #7528

Category

  • New feature
  • Bug fix
  • Improvement
  • Adding new one click service
  • Fixing or updating existing one click service

AI Assistance

  • AI was NOT used to create this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Code (architecture review), Cursor (implementation)
  • How extensively: AI helped plan the approach and review code. Implementation follows existing Coolify patterns and was manually verified.

Testing

Pest feature tests in tests/Feature/ApplicationComposeDatabaseBackupsTest.php:

  1. Parses a compose file with a PostgreSQL service — asserts a ServiceDatabase row is created with the correct application_id
  2. Re-parses with the database service removed — asserts the stale row is cleaned up

Contributor Agreement

[!IMPORTANT]

  • I have read and understood the contributor guidelines. If I have failed to follow any guideline, I understand that this PR may be closed without review.
  • I have searched existing issues and pull requests (including closed ones) to ensure this isn’t a duplicate.
  • I have tested all the changes thoroughly with a local development instance of Coolify and I am confident that they will work as expected when a maintainer tests them.

/claim #7528

Claim

Total prize pool $100
Total paid $0
Status Pending
Submitted March 17, 2026
Last updated March 17, 2026

Contributors

EN

Enkae

@enkae-code

100%

Sponsors

IL

Ilias Ism

@me

$100