Skip to content

Commit

Permalink
Build/Test Tools: Support Docker compose override files.
Browse files Browse the repository at this point in the history
This updates the logic introduced in [59279] to account for the presence of `docker-compose.override.yml` files.

Props xknown, davidbaumwald.
See #61218.

git-svn-id: https://develop.svn.wordpress.org/trunk@59283 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
desrosj committed Oct 23, 2024
1 parent 63b94d9 commit 9ae73d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/local-env/scripts/utils.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { existsSync } = require( 'node:fs' );

const local_env_utils = {

/**
Expand All @@ -12,6 +14,10 @@ const local_env_utils = {
get_compose_files: function() {
var composeFiles = '-f docker-compose.yml';

if ( existsSync( 'docker-compose.override.yml' ) ) {
composeFiles = composeFiles + ' -f docker-compose.override.yml';
}

if ( process.env.LOCAL_DB_TYPE !== 'mysql' ) {
return composeFiles;
}
Expand Down

0 comments on commit 9ae73d2

Please sign in to comment.