/claim #7528
STRAWBERRY
Add database detection and backup support for Docker Compose applications deployed via GitHub App (dockercompose buildpack). Previously, parseDockerComposeFile() only created ServiceDatabase records in the Service code path — the Application code path detected databases but never persisted them, making backups impossible.
This PR adds the full chain: detection → record creation → backup scheduling → backup execution → UI.
Key changes:
application_id FK to service_databases, makes service_id nullable, adds CHECK constraint ensuring at least one parentServiceDatabase model gets application() relationship + parentResource(), server(), getDestination(), parentUuid() helpers for polymorphic parent resolutionparseDockerComposeFile() Application path now creates ServiceDatabase records when isDatabaseImage() returns trueApplication model gets databases() relationshipDatabaseBackupJob, ScheduledDatabaseBackup, BackupEdit, BackupExecutions, Import, StartDatabaseProxy, StopDatabaseProxy, backup download route, cleanup helper, filesystem volumes helper) updated to use new helpers instead of hardcoded ->service-> chainsApplicationDatabaseBackups Livewire component, blade view, and route
- Resolves #7528
- New feature
Screen recording demonstrating the full flow (login → dashboard → application with detected database → backup page → add backup modal) will be attached as a comment.
- AI is used in the process of creating this PR
- Step 1 – Create a new project, add a new Application resource using “Docker Compose” via GitHub App (not “Empty Docker Compose” which uses Service model)
- Step 2 – Use a docker-compose.yml that includes a database service (e.g.
postgres:16ormysql:8) alongside an app service- Step 3 – Deploy the application and verify the compose general view now shows a “Databases” section listing the detected database with its type
- Step 4 – Click the “Backups” link next to the detected database and verify the backup scheduling page loads correctly
- Step 5 – Create a scheduled backup, wait for it to execute, and verify the backup completes successfully
- Step 6 – Verify existing Service-type compose deployments still work as before (no regression)
[!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 tested the changes thoroughly and am confident that they will work as expected without issues when the maintainer tests them
Yuvraj Angad Singh
@yuvrajangadsingh
Ilias Ism
@me