What does this PR do?

Fixes #7528

/claim #7528

Description

When deploying Docker Compose files via GitHub App (using the dockercompose buildpack), database services are not detected and ServiceDatabase records are not created. This means automated backups are unavailable for databases in these deployments.

Root Cause

In bootstrap/helpers/shared.php, the parseDockerComposeFile() function has two paths:

  • Service model path (~line 1423): Calls isDatabaseImage() and creates ServiceDatabase records → backups work
  • Application model path (~line 2418): Calls isDatabaseImage() but only sets a flag → no ServiceDatabase records → no backups

Changes

  1. Migration: Add nullable application_id column to service_databases table (alongside existing service_id)
  2. bootstrap/helpers/shared.php: Create ServiceDatabase records in the Application model path when isDatabaseImage() detects a database service
  3. ServiceDatabase model: Add application() relationship and helper methods (getParentResource(), getServer(), getDestinationNetwork()) to support both Service and Application parent types
  4. DatabaseBackupJob: Use getServer() helper for compatibility with both parent types

Testing

Deployment Method Before After
Empty Docker Compose (Service) ✅ Backups work ✅ Backups work (unchanged)
GitHub App dockercompose (Application) ❌ No backups ✅ Backups work
One-click Services ✅ Backups work ✅ Backups work (unchanged)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Claim

Total prize pool $100
Total paid $0
Status Pending
Submitted February 24, 2026
Last updated February 24, 2026

Contributors

LO

LOLO

@artylobos

100%

Sponsors

IL

Ilias Ism

@me

$100