/claim #7528

Summary

Database services in Docker Compose files deployed via GitHub App (dockercompose buildpack) are now detected and backed up — matching the behavior of Empty Docker Compose and one-click service deployments.

Root Cause

parseDockerComposeFile() in bootstrap/helpers/shared.php has two paths:

  • Service model path: calls isDatabaseImage(), creates ServiceDatabase records ✅
  • Application model path: did NOT call isDatabaseImage() — no backup support ❌

Changes

New Files

  • app/Models/ApplicationDatabase.php — mirrors ServiceDatabase with scheduled backup support via polymorphic relationship
  • app/Policies/ApplicationDatabasePolicy.php — team-based authorization
  • database/migrations/2025_02_19_000001_create_application_databases_table.php
  • database/migrations/2025_02_19_000002_add_image_to_application_databases.php

Modified Files

  • bootstrap/helpers/shared.php — added isDatabaseImage() in Application path, creates ApplicationDatabase records via firstOrCreate()
  • app/Models/Application.php — added databases() hasMany relationship
  • app/Models/ScheduledDatabaseBackup.php — updated server() to handle ApplicationDatabase morph
  • app/Providers/AuthServiceProvider.php — registered new policy

Before / After

Deployment Creates DB Record Backups
Empty Docker Compose ✅ ServiceDatabase
GitHub App (dockercompose) ApplicationDatabase (new)
One-click Services ✅ ServiceDatabase

Claim

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

Contributors

HU

Hussain Alsaibai

@hussain-alsaibai

100%

Sponsors

IL

Ilias Ism

@me

$100