Description

This PR enables database detection and ServiceDatabase record creation for applications deployed via GitHub App using Docker Compose. Previously, database services in these deployments were not detected, preventing automated backups.

Changes

  • Database Migration: Added application_id to service_databases table and made service_id nullable.
  • Models:
    • Updated ServiceDatabase to support belongsTo relationship with Application.
    • Updated ServiceDatabase methods (team, workdir, restart, server) to handle Application relationship.
    • Updated ScheduledDatabaseBackup to resolve server from Application-linked databases.
  • Parsing Logic:
    • Modified parseDockerComposeFile in bootstrap/helpers/shared.php (Application path) to check for database images using isDatabaseImage.
    • Added logic to create/update ServiceDatabase records linked to the Application when a database service is detected.

/fixes #7528 /claim #7528

Summary by CodeRabbit

  • Bug Fixes

    • Improved server/destination fallback when a database service link is missing; explicit existence checks avoid falsey-value issues.
  • New Features

    • Docker Compose database services are tracked per application, with automatic creation/association and image synchronization.
    • Service-database behavior now resolves context from either service or application where applicable.
  • Tests

    • Added feature tests for detection and image update of Docker Compose database services.
  • Chores

    • Migration added to support linking database records to applications.

✏️ Tip: You can customize this high-level summary in your review settings.

Claim

Total prize pool $100
Total paid $0
Status Pending
Submitted December 27, 2025
Last updated December 27, 2025

Contributors

EX

Excellencedev

@Excellencedev

100%

Sponsors

IL

Ilias Ism

@me

$100